mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Add per-scene UndoRedo
This commit is contained in:
parent
99548e521d
commit
ece3df3938
122 changed files with 1498 additions and 642 deletions
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "scene/2d/mesh_instance_2d.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "thirdparty/misc/clipper.hpp"
|
||||
|
|
@ -59,7 +60,7 @@ void Skeleton2DEditor::_menu_option(int p_option) {
|
|||
err_dialog->popup_centered();
|
||||
return;
|
||||
}
|
||||
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
|
||||
ur->create_action(TTR("Set Rest Pose to Bones"));
|
||||
for (int i = 0; i < node->get_bone_count(); i++) {
|
||||
Bone2D *bone = node->get_bone(i);
|
||||
|
|
@ -75,7 +76,7 @@ void Skeleton2DEditor::_menu_option(int p_option) {
|
|||
err_dialog->popup_centered();
|
||||
return;
|
||||
}
|
||||
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo();
|
||||
ur->create_action(TTR("Create Rest Pose from Bones"));
|
||||
for (int i = 0; i < node->get_bone_count(); i++) {
|
||||
Bone2D *bone = node->get_bone(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue