Merge pull request #29974 from clayjohn/particles_restart

Properly set emitting when particles restart
This commit is contained in:
Rémi Verschelde 2019-06-24 13:48:56 +02:00 committed by GitHub
commit 25022a1d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 40 additions and 7 deletions

View file

@ -321,6 +321,11 @@ void ParticlesEditor::_menu_option(int p_option) {
ur->commit_action();
} break;
case MENU_OPTION_RESTART: {
node->restart();
} break;
}
}
@ -471,6 +476,8 @@ ParticlesEditor::ParticlesEditor() {
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("Convert to CPUParticles"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART);
options->get_popup()->connect("id_pressed", this, "_menu_option");