diff options
-rw-r--r-- | AUTHORS.md | 3 | ||||
-rw-r--r-- | DONORS.md | 65 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 59 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.h | 3 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 86 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.h | 4 | ||||
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 4 |
7 files changed, 146 insertions, 78 deletions
diff --git a/AUTHORS.md b/AUTHORS.md index 43b4917382..430bb2dcd4 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -36,6 +36,7 @@ name is available. Andy Moss (MillionOstrich) Anish Bhobe (KidRigger) Anton Yabchinskiy (a12n) + Anutrix Aren Villanueva (kurikaesu) Ariel Manzur (punto-) Bastiaan Olij (BastiaanOlij) @@ -68,6 +69,7 @@ name is available. Gerrit Großkopf (Grosskopf) Gilles Roudiere (groud) Guilherme Felipe de C. G. da Silva (guilhermefelipecgs) + Hanif A (hbina) Hein-Pieter van Braam (hpvb) Hiroshi Ogawa (hi-ogawa) homer666 @@ -128,6 +130,7 @@ name is available. romulox-x Ruslan Mustakov (endragor) Saniko (sanikoyes) + santouits SaracenOne sersoong Simon Wenner (swenner) @@ -20,8 +20,8 @@ generous deed immortalized in the next stable release of Godot Engine. ## Mini sponsors + AD Ford Alan Beauchamp - Aleksandar Kordic Anandarup Mallik Andrew Dunai Brandon Lamb @@ -30,8 +30,10 @@ generous deed immortalized in the next stable release of Godot Engine. Christoph Woinke Denis Malyavin Edward Flick + Gamechuck GameDev.net GameDev.tv + Grady Hein-Pieter van Braam Jacob McKenney Javary Co. @@ -46,7 +48,6 @@ generous deed immortalized in the next stable release of Godot Engine. Patrick Aarstad Slobodan Milnovic Stephan Lanfermann - Stephen Telford Steve VilliHaukka Xananax @@ -59,7 +60,6 @@ generous deed immortalized in the next stable release of Godot Engine. David Gehrig Ed Morley Florian Krick - Grady Jakub Grzesik K9Kraken Manuele Finocchiaro @@ -77,11 +77,14 @@ generous deed immortalized in the next stable release of Godot Engine. Carlo Cabanilla Daniel James David Giardi + David Snopek Edward E Florian Breisch Gero + GiulianoB Javier Roman Jay Horton + Jonathan Turner Jon Smith Jon Woodward Justo Delgado Baudí @@ -89,13 +92,12 @@ generous deed immortalized in the next stable release of Godot Engine. Kommentgames Krzysztof Dluzniewski Luke + Maciej Pendolski Moonwards Mored1984 - paul gruenbacher Paul LaMotte Péter Magyar Rob Messick - Ross Esmond Ryan Badour Scott Wadden Sergey @@ -103,7 +105,6 @@ generous deed immortalized in the next stable release of Godot Engine. Svenne Krap Tom Langwaldt William Wold - Wyatt Goodin Alex Khayrullin Chris Goddard @@ -115,6 +116,7 @@ generous deed immortalized in the next stable release of Godot Engine. Ian Richard Kunert Ivan Trombley Joan Fons + Joshua Flores Krzysztof Jankowski Lord Bloodhound Lucas Ferreira Franca @@ -135,7 +137,6 @@ generous deed immortalized in the next stable release of Godot Engine. Xavier PATRICELLI Adam Neumann - Alessandra Pereyra Alexander J Maynard Alexey Dyadchenko Andrew Bowen @@ -150,7 +151,6 @@ generous deed immortalized in the next stable release of Godot Engine. Daniel Daniel Eichler David White - Deadly Lampshade Eric Eric Monson Eugenio Hugo Salgüero Jáñez @@ -158,7 +158,6 @@ generous deed immortalized in the next stable release of Godot Engine. Francisco Javier Moreno Carracedo gavlig GGGames.org - Giles Montgomery Guilherme Felipe de C. G. da Silva Heath Hayes Hysteria @@ -166,14 +165,12 @@ generous deed immortalized in the next stable release of Godot Engine. Jared White Jesse Nave Jose Malheiro - Joshua Flores Joshua Lesperance Juan T Chen Juraj Móza Kasper Jeppesen Klaus The. Klavdij Voncina - Leandro Voltolino Maarten Elings Markus Fehr Markus Wiesner @@ -190,6 +187,7 @@ generous deed immortalized in the next stable release of Godot Engine. Paul Hocker Paul Von Zimmerman Pete Goodwin + pl Ranoller Samuel Judd Scott Pilet @@ -198,37 +196,37 @@ generous deed immortalized in the next stable release of Godot Engine. Thomas Krampl Tobias Bocanegra Urho - WytRabbit Xavier Fumado Beltran ## Silver donors 1D_Inc + Abby Jones Abraham Haskins Adam Brunnmeier Adam Carr Adam Nakonieczny Adam Smeltzer Adisibio + Adrian Demetrescu Agustinus Arya Aidan O'Flannagain + Albin Jonasson Svärdsby Alder Stefano Alessandro Senese - Alexander Gillberg Alexander Koppe Alex Davies-Moore - Alice Robinson Andreas Evers Andreas Krampitz + Andreas Lundmark Andreas Schüle - Andrew Peart + Andrés Rodríguez + Andrzej Skalski Anthony Bongiovanni Anthony Staunton Antony K. Jones Arda Erol - Artem Bashev Arthur S. Muszynski - Artistofdeath Aubrey Falconer Avencherus B A @@ -238,8 +236,6 @@ generous deed immortalized in the next stable release of Godot Engine. Benedikt Ben Phelan Ben Vercammen - Ben Woodley - Berbank Bernd Jänichen Black Block Blair Allen @@ -261,9 +257,9 @@ generous deed immortalized in the next stable release of Godot Engine. Collin Shooltz Dag Sundin Söderström Daniel Johnson + DanielMaximiano Daniel Reed - Danny Welch - Dave Watts + Daniel Tebbutt David Bullock David Cravens David May @@ -330,20 +326,23 @@ generous deed immortalized in the next stable release of Godot Engine. Josh 'Cheeseness' Bush Juanfran Juan Negrier + Juan Velandia Judd Jueast Julian Murgia + Kamuna Kasier Bald0 KC Chan + Keedong Park kickmaniac Kiyohiro Kawamura (kyorohiro) + Kjetil Haugland Klagsam Klassix KR McGinley KsyTek Games Kuan Cheang kycho - Leviathan Hunter Levi Lindsey Linus Lind Lundgren Lionel Gaillard @@ -357,6 +356,7 @@ generous deed immortalized in the next stable release of Godot Engine. Malik Nejer Marc Urlus Marcus Richter + Markus Lohaus Markus Michael Egger Martin Holas Matthew Little @@ -365,6 +365,7 @@ generous deed immortalized in the next stable release of Godot Engine. mhilbrunner Michael Dürwald Michael Gringauz + Michael Haney Michael Labbe Mikael Olsson Mikayla Hutchinson @@ -372,7 +373,6 @@ generous deed immortalized in the next stable release of Godot Engine. Mitchell J. Wagner mlevin cantu MoM - Moritz Laass MuffinManKen Natrim nee @@ -382,9 +382,11 @@ generous deed immortalized in the next stable release of Godot Engine. Niclas Eriksen Nicolás Montaña Nicolas SAN AGUSTIN + Nima Farid Nithin Jino NZ Omar Delarosa + omzee Oscar Norlander Pafka Pan Ip @@ -393,16 +395,19 @@ generous deed immortalized in the next stable release of Godot Engine. Paul Gieske Paul Mason Paweł Kowal - Philip O. Staiger Pierre-Igor Berthet Pietro Vertechi Pitsanu Tongprasin Point08 Poryg + Rafael Delboni Rafa Laguna Rafal Wyszomirski + rainerLinux Raphael Leroux + Remi Rampin Rémi Verschelde + Rezgi Ricardo Alcantara Robert Farr (Larington) Robert Hernandez @@ -410,6 +415,8 @@ generous deed immortalized in the next stable release of Godot Engine. Roger Smith Roland Rząsa Roman Tinkov + Ryan + Ryan Brooks Ryan Groom Ryan Hentz Saad Khoudmi @@ -418,6 +425,7 @@ generous deed immortalized in the next stable release of Godot Engine. Sasori Olkof Scott D. Yelich Sebastian Michailidis + sgnsajgon Shane Sicienski Shane Spoor Simon Ledam @@ -425,16 +433,14 @@ generous deed immortalized in the next stable release of Godot Engine. SK Sootstone Stonepyre - Thibault Barbaroux + Taylor Fahlman thomas Thomas Bell Thomas Kelly Thomas Kurz tiansheng li - Tim Tim Drumheller Tim Gudex - Timo Schmidt Timothy B. MacDonald Tobbun Tom Larrow @@ -446,8 +452,6 @@ generous deed immortalized in the next stable release of Godot Engine. Tyler Stafos UltyX Vaiktorg - Valeria Viana Gusmao - Veodok Victor Vigilant Watch waka nya @@ -457,7 +461,8 @@ generous deed immortalized in the next stable release of Godot Engine. Will William Hogben Wout Standaert - Yeung Si Xiang + Wyatt Goodin + Yegor ## Bronze donors diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 9cf889c5b0..9418349d71 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -485,7 +485,7 @@ void ScriptEditor::_update_recent_scripts() { Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scripts", Array()); recent_scripts->clear(); - recent_scripts->add_shortcut(ED_SHORTCUT("script_editor/open_recent", TTR("Open Recent"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_T)); + recent_scripts->add_shortcut(ED_SHORTCUT("script_editor/open_recent", TTR("Open Recent"))); recent_scripts->add_separator(); String path; @@ -579,6 +579,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { Ref<Script> script = current->get_edited_resource(); if (script != NULL) { + previous_scripts.push_back(script->get_path()); notify_script_close(script); } } @@ -907,7 +908,7 @@ void ScriptEditor::_file_dialog_action(String p_file) { if (extensions.find(p_file.get_extension())) { Ref<Script> scr = ResourceLoader::load(p_file); if (!scr.is_valid()) { - editor->show_warning(TTR("Error: could not load file."), TTR("Error!")); + editor->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); file_dialog_option = -1; return; } @@ -920,7 +921,7 @@ void ScriptEditor::_file_dialog_action(String p_file) { Error error; Ref<TextFile> text_file = _load_text_file(p_file, &error); if (error != OK) { - editor->show_warning(TTR("Error could not load file."), TTR("Error!")); + editor->show_warning(TTR("Could not load file at:") + "\n\n" + p_file, TTR("Error!")); } if (text_file.is_valid()) { @@ -1012,6 +1013,52 @@ void ScriptEditor::_menu_option(int p_option) { file_dialog->set_title(TTR("Open File")); return; } break; + case FILE_REOPEN_CLOSED: { + + if (previous_scripts.empty()) + return; + + String path = previous_scripts.back()->get(); + previous_scripts.pop_back(); + + List<String> extensions; + ResourceLoader::get_recognized_extensions_for_type("Script", &extensions); + bool built_in = !path.is_resource_file(); + + if (extensions.find(path.get_extension()) || built_in) { + if (built_in) { + String scene_path = path.get_slice("::", 0); + if (!EditorNode::get_singleton()->is_scene_open(scene_path)) { + EditorNode::get_singleton()->load_scene(scene_path); + script_editor->call_deferred("_menu_option", p_option); + previous_scripts.push_back(path); //repeat the operation + return; + } + } + + Ref<Script> scr = ResourceLoader::load(path); + if (!scr.is_valid()) { + editor->show_warning(TTR("Could not load file at:") + "\n\n" + path, TTR("Error!")); + file_dialog_option = -1; + return; + } + + edit(scr); + file_dialog_option = -1; + return; + } else { + Error error; + Ref<TextFile> text_file = _load_text_file(path, &error); + if (error != OK) + editor->show_warning(TTR("Could not load file at:") + "\n\n" + path, TTR("Error!")); + + if (text_file.is_valid()) { + edit(text_file); + file_dialog_option = -1; + return; + } + } + } break; case FILE_SAVE_ALL: { if (_test_script_times_on_disk()) @@ -1894,6 +1941,8 @@ void ScriptEditor::_update_script_names() { _update_members_overview_visibility(); _update_help_overview_visibility(); _update_script_colors(); + + file_menu->get_popup()->set_item_disabled(file_menu->get_popup()->get_item_index(FILE_REOPEN_CLOSED), previous_scripts.empty()); } void ScriptEditor::_update_script_connections() { @@ -3172,6 +3221,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/new", TTR("New Script...")), FILE_NEW); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/new_textfile", TTR("New TextFile...")), FILE_NEW_TEXTFILE); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/open", TTR("Open...")), FILE_OPEN); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reopen_closed_script", TTR("Reopen Closed Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_T), FILE_REOPEN_CLOSED); file_menu->get_popup()->add_submenu_item(TTR("Open Recent"), "RecentScripts", FILE_OPEN_RECENT); recent_scripts = memnew(PopupMenu); @@ -3500,7 +3550,8 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) { EDITOR_DEF("text_editor/external/exec_flags", "{file}"); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "text_editor/external/exec_flags", PROPERTY_HINT_PLACEHOLDER_TEXT, "Call flags with placeholders: {project}, {file}, {col}, {line}.")); - ED_SHORTCUT("script_editor/open_recent", TTR("Open Recent"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_T); + ED_SHORTCUT("script_editor/reopen_closed_script", TTR("Reopen Closed Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_T); + ED_SHORTCUT("script_editor/open_recent", TTR("Open Recent")); ED_SHORTCUT("script_editor/clear_recent", TTR("Clear Recent Files")); } diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 4ad2156779..0c876108a5 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -139,6 +139,7 @@ class ScriptEditor : public PanelContainer { FILE_NEW, FILE_NEW_TEXTFILE, FILE_OPEN, + FILE_REOPEN_CLOSED, FILE_OPEN_RECENT, FILE_SAVE, FILE_SAVE_AS, @@ -265,7 +266,7 @@ class ScriptEditor : public PanelContainer { Vector<ScriptHistory> history; int history_pos; - Vector<String> previous_scripts; + List<String> previous_scripts; void _tab_changed(int p_which); void _menu_option(int p_option); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 630f3ba9e1..6af6d48618 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -250,15 +250,7 @@ Vector3 SpatialEditorViewport::_get_ray(const Vector2 &p_pos) const { return camera->project_ray_normal(p_pos / viewport_container->get_stretch_shrink()); } -/* -void SpatialEditorViewport::_clear_id(Spatial *p_node) { - - editor_selection->remove_node(p_node); - - -} -*/ void SpatialEditorViewport::_clear_selected() { editor_selection->clear(); @@ -4001,11 +3993,11 @@ void SpatialEditor::select_gizmo_highlight_axis(int p_axis) { for (int i = 0; i < 3; i++) { - move_gizmo[i]->surface_set_material(0, i == p_axis ? gizmo_hl : gizmo_color[i]); - move_plane_gizmo[i]->surface_set_material(0, (i + 6) == p_axis ? gizmo_hl : plane_gizmo_color[i]); - rotate_gizmo[i]->surface_set_material(0, (i + 3) == p_axis ? gizmo_hl : gizmo_color[i]); - scale_gizmo[i]->surface_set_material(0, (i + 9) == p_axis ? gizmo_hl : gizmo_color[i]); - scale_plane_gizmo[i]->surface_set_material(0, (i + 12) == p_axis ? gizmo_hl : plane_gizmo_color[i]); + move_gizmo[i]->surface_set_material(0, i == p_axis ? gizmo_color_hl[i] : gizmo_color[i]); + move_plane_gizmo[i]->surface_set_material(0, (i + 6) == p_axis ? plane_gizmo_color_hl[i] : plane_gizmo_color[i]); + rotate_gizmo[i]->surface_set_material(0, (i + 3) == p_axis ? gizmo_color_hl[i] : gizmo_color[i]); + scale_gizmo[i]->surface_set_material(0, (i + 9) == p_axis ? gizmo_color_hl[i] : gizmo_color[i]); + scale_plane_gizmo[i]->surface_set_material(0, (i + 12) == p_axis ? plane_gizmo_color_hl[i] : plane_gizmo_color[i]); } } @@ -4084,6 +4076,23 @@ Object *SpatialEditor::_get_editor_data(Object *p_what) { return si; } +Color SpatialEditor::_get_axis_color(int axis) { + + switch (axis) { + case 0: + // X axis + return Color(0.96, 0.20, 0.32); + case 1: + // Y axis + return Color(0.53, 0.84, 0.01); + case 2: + // Z axis + return Color(0.16, 0.55, 0.96); + default: + return Color(0, 0, 0); + } +} + void SpatialEditor::_generate_selection_box() { AABB aabb(Vector3(), Vector3(1, 1, 1)); @@ -4097,11 +4106,6 @@ void SpatialEditor::_generate_selection_box() { Vector3 a, b; aabb.get_edge(i, a, b); - /*Vector<Vector3> points; - Vector<Color> colors; - points.push_back(a); - points.push_back(b);*/ - st->add_color(Color(1.0, 1.0, 0.8, 0.8)); st->add_vertex(a); st->add_color(Color(1.0, 1.0, 0.8, 0.4)); @@ -4640,12 +4644,13 @@ void SpatialEditor::_init_indicators() { for (int i = 0; i < 3; i++) { Vector3 axis; axis[i] = 1; + Color origin_color = _get_axis_color(i); grid_enable[i] = false; grid_visible[i] = false; - origin_colors.push_back(Color(axis.x, axis.y, axis.z)); - origin_colors.push_back(Color(axis.x, axis.y, axis.z)); + origin_colors.push_back(origin_color); + origin_colors.push_back(origin_color); origin_points.push_back(axis * 4096); origin_points.push_back(axis * -4096); } @@ -4674,17 +4679,11 @@ void SpatialEditor::_init_indicators() { //move gizmo - float gizmo_alph = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_opacity"); - - gizmo_hl = Ref<SpatialMaterial>(memnew(SpatialMaterial)); - gizmo_hl->set_flag(SpatialMaterial::FLAG_UNSHADED, true); - gizmo_hl->set_on_top_of_alpha(); - gizmo_hl->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); - gizmo_hl->set_albedo(Color(1, 1, 1, gizmo_alph + 0.2f)); - gizmo_hl->set_cull_mode(SpatialMaterial::CULL_DISABLED); - for (int i = 0; i < 3; i++) { + Color col = _get_axis_color(i); + col.a = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_opacity"); + move_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh)); move_plane_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh)); rotate_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh)); @@ -4695,13 +4694,13 @@ void SpatialEditor::_init_indicators() { mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true); mat->set_on_top_of_alpha(); mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); - Color col; - col[i] = 1.0; - col.a = gizmo_alph; mat->set_albedo(col); - gizmo_color[i] = mat; + Ref<SpatialMaterial> mat_hl = mat->duplicate(); + mat_hl->set_albedo(Color(col.r, col.g, col.b, 1.0)); + gizmo_color_hl[i] = mat_hl; + Vector3 ivec; ivec[i] = 1; Vector3 nivec; @@ -4791,13 +4790,14 @@ void SpatialEditor::_init_indicators() { plane_mat->set_on_top_of_alpha(); plane_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); plane_mat->set_cull_mode(SpatialMaterial::CULL_DISABLED); - Color col2; - col2[i] = 1.0; - col2.a = gizmo_alph; - plane_mat->set_albedo(col2); + plane_mat->set_albedo(col); plane_gizmo_color[i] = plane_mat; // needed, so we can draw planes from both sides surftool->set_material(plane_mat); surftool->commit(move_plane_gizmo[i]); + + Ref<SpatialMaterial> plane_mat_hl = plane_mat->duplicate(); + plane_mat_hl->set_albedo(Color(col.r, col.g, col.b, 1.0)); + plane_gizmo_color_hl[i] = plane_mat_hl; // needed, so we can draw planes from both sides } // Rotate @@ -4920,13 +4920,14 @@ void SpatialEditor::_init_indicators() { plane_mat->set_on_top_of_alpha(); plane_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); plane_mat->set_cull_mode(SpatialMaterial::CULL_DISABLED); - Color col2; - col2[i] = 1.0; - col2.a = gizmo_alph; - plane_mat->set_albedo(col2); + plane_mat->set_albedo(col); plane_gizmo_color[i] = plane_mat; // needed, so we can draw planes from both sides surftool->set_material(plane_mat); surftool->commit(scale_plane_gizmo[i]); + + Ref<SpatialMaterial> plane_mat_hl = plane_mat->duplicate(); + plane_mat_hl->set_albedo(Color(col.r, col.g, col.b, 1.0)); + plane_gizmo_color_hl[i] = plane_mat_hl; // needed, so we can draw planes from both sides } } } @@ -5824,7 +5825,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,1024,1")); - EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.2); + EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.4); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01")); over_gizmo_handle = -1; } diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index dde402c0ff..523573333b 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -528,7 +528,8 @@ private: Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3], scale_gizmo[3], scale_plane_gizmo[3]; Ref<SpatialMaterial> gizmo_color[3]; Ref<SpatialMaterial> plane_gizmo_color[3]; - Ref<SpatialMaterial> gizmo_hl; + Ref<SpatialMaterial> gizmo_color_hl[3]; + Ref<SpatialMaterial> plane_gizmo_color_hl[3]; int over_gizmo_handle; @@ -635,6 +636,7 @@ private: Node *custom_camera; Object *_get_editor_data(Object *p_what); + Color _get_axis_color(int axis); Ref<Environment> viewport_environment; diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 4b309a93b5..f9f273d494 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -962,9 +962,13 @@ void CPUParticles2D::_set_redraw(bool p_redraw) { if (redraw) { VS::get_singleton()->connect("frame_pre_draw", this, "_update_render_thread"); VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), true); + + VS::get_singleton()->multimesh_set_visible_instances(multimesh, -1); } else { VS::get_singleton()->disconnect("frame_pre_draw", this, "_update_render_thread"); VS::get_singleton()->canvas_item_set_update_when_visible(get_canvas_item(), false); + + VS::get_singleton()->multimesh_set_visible_instances(multimesh, 0); } #ifndef NO_THREADS update_mutex->unlock(); |