diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-24 13:48:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-24 13:48:56 +0200 |
commit | 25022a1d89e83bbad6f4e5d8db0a4f1939bbf3ea (patch) | |
tree | e8d64bfd21236eb9820079c379093be0328cd52e /editor/plugins/cpu_particles_editor_plugin.cpp | |
parent | 1cb2b682ab72e2c457b54fdf63628bc1db126c7d (diff) | |
parent | 64ecc8a5a3e22f92cf480f65249ac5468b9b5b89 (diff) |
Merge pull request #29974 from clayjohn/particles_restart
Properly set emitting when particles restart
Diffstat (limited to 'editor/plugins/cpu_particles_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/cpu_particles_editor_plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/cpu_particles_editor_plugin.cpp b/editor/plugins/cpu_particles_editor_plugin.cpp index 70be9b95bb..93ffce41fa 100644 --- a/editor/plugins/cpu_particles_editor_plugin.cpp +++ b/editor/plugins/cpu_particles_editor_plugin.cpp @@ -62,6 +62,12 @@ void CPUParticlesEditor::_menu_option(int p_option) { emission_tree_dialog->popup_centered_ratio(); } break; + + case MENU_OPTION_RESTART: { + + node->restart(); + + } break; } } @@ -108,6 +114,8 @@ CPUParticlesEditor::CPUParticlesEditor() { options->set_text(TTR("CPUParticles")); options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH); options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE); + options->get_popup()->add_separator(); + options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART); options->get_popup()->connect("id_pressed", this, "_menu_option"); } |