mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 19:54:27 +00:00
Huge Debugger/EditorDebugger refactor.
This commit is contained in:
parent
8b058d4b9a
commit
cbc450c0e5
41 changed files with 4487 additions and 3292 deletions
|
|
@ -35,6 +35,7 @@
|
|||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
|
||||
#include "editor/debugger/editor_debugger_node.h"
|
||||
#include "editor/editor_feature_profile.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
|
|
@ -44,7 +45,6 @@
|
|||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||
#include "editor/plugins/script_editor_plugin.h"
|
||||
#include "editor/plugins/spatial_editor_plugin.h"
|
||||
#include "editor/script_editor_debugger.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "scene/resources/packed_scene.h"
|
||||
|
||||
|
|
@ -229,9 +229,9 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
|
|||
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene);
|
||||
|
||||
String new_name = parent->validate_child_name(instanced_scene);
|
||||
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
|
||||
editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name);
|
||||
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(new_name)));
|
||||
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
|
||||
editor_data->get_undo_redo().add_do_method(ed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name);
|
||||
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(new_name)));
|
||||
}
|
||||
|
||||
editor_data->get_undo_redo().commit_action();
|
||||
|
|
@ -591,10 +591,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", dup);
|
||||
editor_data->get_undo_redo().add_do_reference(dup);
|
||||
|
||||
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
|
||||
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
|
||||
|
||||
editor_data->get_undo_redo().add_do_method(sed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
|
||||
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name())));
|
||||
editor_data->get_undo_redo().add_do_method(ed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
|
||||
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name())));
|
||||
}
|
||||
|
||||
editor_data->get_undo_redo().commit_action();
|
||||
|
|
@ -1584,7 +1584,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
|
|||
if (p_position_in_parent >= 0)
|
||||
editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc);
|
||||
|
||||
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
|
||||
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
|
||||
String old_name = former_names[ni];
|
||||
String new_name = new_parent->validate_child_name(node);
|
||||
|
||||
|
|
@ -1609,8 +1609,8 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
|
|||
path_renames[ni].second = fixed_node_path;
|
||||
}
|
||||
|
||||
editor_data->get_undo_redo().add_do_method(sed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
|
||||
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
|
||||
editor_data->get_undo_redo().add_do_method(ed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
|
||||
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
|
||||
|
||||
if (p_keep_global_xform) {
|
||||
if (Object::cast_to<Node2D>(node))
|
||||
|
|
@ -1849,9 +1849,9 @@ void SceneTreeDock::_delete_confirm() {
|
|||
editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners);
|
||||
editor_data->get_undo_redo().add_undo_reference(n);
|
||||
|
||||
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
|
||||
editor_data->get_undo_redo().add_do_method(sed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id());
|
||||
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
|
||||
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
|
||||
editor_data->get_undo_redo().add_do_method(ed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id());
|
||||
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
|
||||
}
|
||||
}
|
||||
editor_data->get_undo_redo().commit_action();
|
||||
|
|
@ -1950,9 +1950,9 @@ void SceneTreeDock::_do_create(Node *p_parent) {
|
|||
editor_data->get_undo_redo().add_undo_method(p_parent, "remove_child", child);
|
||||
|
||||
String new_name = p_parent->validate_child_name(child);
|
||||
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
|
||||
editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name);
|
||||
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name)));
|
||||
EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
|
||||
editor_data->get_undo_redo().add_do_method(ed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name);
|
||||
editor_data->get_undo_redo().add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name)));
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue