1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Allow undo conversion to CPUParticles

This commit is contained in:
Tomasz Chabora
2019-05-30 23:08:57 +02:00
parent a2cf1c3d04
commit 1141ab8b25
2 changed files with 8 additions and 2 deletions

View File

@@ -94,7 +94,7 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) {
cpu_particles->set_z_index(particles->get_z_index());
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
ur->create_action(TTR("Convert from Particles2D"));
ur->create_action(TTR("Convert to CPUParticles"));
ur->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock(), "replace_node", particles, cpu_particles, true, false);
ur->add_do_reference(particles);
ur->add_undo_method(EditorNode::get_singleton()->get_scene_tree_dock(), "replace_node", cpu_particles, particles, false, false);