diff options
Diffstat (limited to 'editor/scene_tree_dock.h')
-rw-r--r-- | editor/scene_tree_dock.h | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 72be3fb02f..9bc281c7fb 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -34,7 +34,6 @@ #include "editor/connections_dialog.h" #include "editor/create_dialog.h" #include "editor/editor_data.h" -#include "editor/editor_sub_scene.h" #include "editor/groups_editor.h" #include "editor/quick_open.h" #include "editor/rename_dialog.h" @@ -46,7 +45,6 @@ #include "scene/gui/control.h" #include "scene/gui/label.h" #include "scene/gui/popup_menu.h" -#include "scene/gui/tool_button.h" #include "scene/gui/tree.h" #include "scene_tree_editor.h" @@ -56,10 +54,12 @@ class SceneTreeDock : public VBoxContainer { GDCLASS(SceneTreeDock, VBoxContainer); enum Tool { - TOOL_NEW, TOOL_INSTANCE, TOOL_EXPAND_COLLAPSE, + TOOL_CUT, + TOOL_COPY, + TOOL_PASTE, TOOL_RENAME, TOOL_BATCH_RENAME, TOOL_REPLACE, @@ -73,7 +73,6 @@ class SceneTreeDock : public VBoxContainer { TOOL_REPARENT_TO_NEW_NODE, TOOL_MAKE_ROOT, TOOL_NEW_SCENE_FROM, - TOOL_MERGE_FROM_SCENE, TOOL_MULTI_EDIT, TOOL_ERASE, TOOL_COPY_NODE_PATH, @@ -106,15 +105,18 @@ class SceneTreeDock : public VBoxContainer { CreateDialog *create_dialog; RenameDialog *rename_dialog; - ToolButton *button_add; - ToolButton *button_instance; - ToolButton *button_create_script; - ToolButton *button_detach_script; + Button *button_add; + Button *button_instance; + Button *button_create_script; + Button *button_detach_script; + Button *button_2d; Button *button_3d; + Button *button_ui; + Button *button_custom; HBoxContainer *button_hb; - ToolButton *edit_local, *edit_remote; + Button *edit_local, *edit_remote; SceneTreeEditor *scene_tree; Control *remote_tree; @@ -125,6 +127,10 @@ class SceneTreeDock : public VBoxContainer { EditorData *editor_data; EditorSelection *editor_selection; + List<Node *> node_clipboard; + String clipboard_source_scene; + HashMap<String, Map<RES, RES>> clipboard_resource_remap; + ScriptCreateDialog *script_create_dialog; AcceptDialog *accept; ConfirmationDialog *delete_dialog; @@ -133,7 +139,6 @@ class SceneTreeDock : public VBoxContainer { ReparentDialog *reparent_dialog; EditorQuickOpen *quick_open; - EditorSubScene *import_subscene_dialog; EditorFileDialog *new_scene_from_dialog; LineEdit *filter; @@ -182,7 +187,7 @@ class SceneTreeDock : public VBoxContainer { void _script_created(Ref<Script> p_script); void _script_creation_closed(); - void _delete_confirm(); + void _delete_confirm(bool p_cut = false); void _toggle_editable_children_from_selection(); void _toggle_editable_children(Node *p_node); @@ -202,7 +207,6 @@ class SceneTreeDock : public VBoxContainer { bool _validate_no_foreign(); void _selection_changed(); void _update_script_button(); - Node *_get_selection_group_tail(Node *p_node, List<Node *> p_list); void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, List<Pair<NodePath, NodePath>> *p_renames); @@ -230,6 +234,10 @@ class SceneTreeDock : public VBoxContainer { void _feature_profile_changed(); + void _clear_clipboard(); + void _create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap); + void _create_remap_for_resource(RES p_resource, Map<RES, RES> &r_remap); + bool profile_allow_editing; bool profile_allow_script_editing; @@ -267,6 +275,7 @@ public: ScriptCreateDialog *get_script_create_dialog() { return script_create_dialog; } SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data); + ~SceneTreeDock(); }; #endif // SCENE_TREE_DOCK_H |