You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add EditorUndoRedoManager singleton
This commit is contained in:
@@ -65,7 +65,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
switch (p_option) {
|
||||
case MENU_OPTION_CREATE_STATIC_TRIMESH_BODY: {
|
||||
EditorSelection *editor_selection = EditorNode::get_singleton()->get_editor_selection();
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
|
||||
List<Node *> selection = editor_selection->get_selected_node_list();
|
||||
|
||||
@@ -152,7 +152,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
|
||||
Node *owner = get_tree()->get_edited_scene_root();
|
||||
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
|
||||
ur->create_action(TTR("Create Trimesh Static Shape"));
|
||||
|
||||
@@ -182,7 +182,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
err_dialog->popup_centered();
|
||||
return;
|
||||
}
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
|
||||
if (simplify) {
|
||||
ur->create_action(TTR("Create Simplified Convex Shape"));
|
||||
@@ -222,7 +222,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
err_dialog->popup_centered();
|
||||
return;
|
||||
}
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
|
||||
ur->create_action(TTR("Create Multiple Convex Shapes"));
|
||||
|
||||
@@ -259,7 +259,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
|
||||
Node *owner = get_tree()->get_edited_scene_root();
|
||||
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
ur->create_action(TTR("Create Navigation Mesh"));
|
||||
|
||||
ur->add_do_method(node, "add_child", nmi, true);
|
||||
@@ -275,7 +275,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
outline_dialog->popup_centered(Vector2(200, 90));
|
||||
} break;
|
||||
case MENU_OPTION_CREATE_DEBUG_TANGENTS: {
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
ur->create_action(TTR("Create Debug Tangents"));
|
||||
|
||||
MeshInstance3D *tangents = node->create_debug_tangents_node();
|
||||
@@ -334,7 +334,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
return;
|
||||
}
|
||||
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
ur->create_action(TTR("Unwrap UV2"));
|
||||
|
||||
ur->add_do_method(node, "set_mesh", unwrapped_mesh);
|
||||
@@ -493,7 +493,7 @@ void MeshInstance3DEditor::_create_outline_mesh() {
|
||||
mi->set_mesh(mesho);
|
||||
Node *owner = get_tree()->get_edited_scene_root();
|
||||
|
||||
Ref<EditorUndoRedoManager> &ur = EditorNode::get_singleton()->get_undo_redo();
|
||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
||||
|
||||
ur->create_action(TTR("Create Outline"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user