diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-08-18 19:40:52 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 11:59:25 +0100 |
commit | 449df8f688080c02bfbbfafc45421875b77deb1b (patch) | |
tree | ac9818b892c5d85fdcf4e4e89e383bc4dc46b7f8 /editor/plugins | |
parent | 7fa978517077333fba215e17181e1600d485fa43 (diff) |
Base 3D engine done, still untested, though.
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/collision_polygon_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/sprite_editor_plugin.cpp | 2 |
5 files changed, 3 insertions, 12 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 5e69ce4e69..d8bbac9c49 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1322,11 +1322,10 @@ void AnimationPlayerEditor::_allocate_onion_layers() { // Each capture is a viewport with a canvas item attached that renders a full-size rect with the contents of the main viewport. onion.captures.write[i] = VS::get_singleton()->viewport_create(); - VS::get_singleton()->viewport_set_usage(onion.captures[i], VS::VIEWPORT_USAGE_2D); + VS::get_singleton()->viewport_set_size(onion.captures[i], capture_size.width, capture_size.height); VS::get_singleton()->viewport_set_update_mode(onion.captures[i], VS::VIEWPORT_UPDATE_ALWAYS); VS::get_singleton()->viewport_set_transparent_background(onion.captures[i], !is_present); - VS::get_singleton()->viewport_set_vflip(onion.captures[i], true); VS::get_singleton()->viewport_attach_canvas(onion.captures[i], onion.capture.canvas); } diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp index 612b21204d..32075e82be 100644 --- a/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_editor_plugin.cpp @@ -463,9 +463,7 @@ void Polygon3DEditor::_polygon_draw() { imgeom->end(); - while (m->get_surface_count()) { - m->surface_remove(0); - } + m->clear_surfaces(); if (poly.size() == 0) return; diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 2037c17b89..6e8aef0aea 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -370,7 +370,6 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() { VS::get_singleton()->viewport_set_size(viewport, 128, 128); VS::get_singleton()->viewport_set_transparent_background(viewport, true); VS::get_singleton()->viewport_set_active(viewport, true); - VS::get_singleton()->viewport_set_vflip(viewport, true); viewport_texture = VS::get_singleton()->viewport_get_texture(viewport); camera = VS::get_singleton()->camera_create(); @@ -773,7 +772,6 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() { viewport = VS::get_singleton()->viewport_create(); VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_DISABLED); - VS::get_singleton()->viewport_set_vflip(viewport, true); VS::get_singleton()->viewport_set_scenario(viewport, scenario); VS::get_singleton()->viewport_set_size(viewport, 128, 128); VS::get_singleton()->viewport_set_transparent_background(viewport, true); @@ -904,7 +902,6 @@ EditorFontPreviewPlugin::EditorFontPreviewPlugin() { viewport = VS::get_singleton()->viewport_create(); VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_DISABLED); - VS::get_singleton()->viewport_set_vflip(viewport, true); VS::get_singleton()->viewport_set_size(viewport, 128, 128); VS::get_singleton()->viewport_set_active(viewport, true); viewport_texture = VS::get_singleton()->viewport_get_texture(viewport); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index c07983b647..e062246665 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2272,9 +2272,6 @@ void SpatialEditorViewport::_notification(int p_what) { int msaa_mode = ProjectSettings::get_singleton()->get("rendering/quality/filters/msaa"); viewport->set_msaa(Viewport::MSAA(msaa_mode)); - bool hdr = ProjectSettings::get_singleton()->get("rendering/quality/depth/hdr"); - viewport->set_hdr(hdr); - bool show_info = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_INFORMATION)); info_label->set_visible(show_info); diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index 9fd9fefee6..2736bbfd3a 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -330,7 +330,7 @@ void SpriteEditor::_convert_to_mesh_2d_node() { a[Mesh::ARRAY_TEX_UV] = computed_uv; a[Mesh::ARRAY_INDEX] = computed_indices; - mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, a, Array(), Mesh::ARRAY_FLAG_USE_2D_VERTICES); + mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, a, Array(), Dictionary(), Mesh::ARRAY_FLAG_USE_2D_VERTICES); MeshInstance2D *mesh_instance = memnew(MeshInstance2D); mesh_instance->set_mesh(mesh); |