diff options
Diffstat (limited to 'editor/scene_tree_dock.h')
-rw-r--r-- | editor/scene_tree_dock.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 1086e8615f..dc7becfa2f 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-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 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 */ @@ -31,7 +31,6 @@ #ifndef SCENE_TREE_DOCK_H #define SCENE_TREE_DOCK_H -#include "editor/connections_dialog.h" #include "editor/create_dialog.h" #include "editor/editor_data.h" #include "editor/groups_editor.h" @@ -48,6 +47,8 @@ #include "scene/gui/tree.h" #include "scene_tree_editor.h" +#include "modules/modules_enabled.gen.h" // For regex. + class EditorNode; class ShaderCreateDialog; @@ -62,7 +63,9 @@ class SceneTreeDock : public VBoxContainer { TOOL_COPY, TOOL_PASTE, TOOL_RENAME, +#ifdef MODULE_REGEX_ENABLED TOOL_BATCH_RENAME, +#endif // MODULE_REGEX_ENABLED TOOL_REPLACE, TOOL_EXTEND_SCRIPT, TOOL_ATTACH_SCRIPT, @@ -79,6 +82,7 @@ class SceneTreeDock : public VBoxContainer { TOOL_COPY_NODE_PATH, TOOL_BUTTON_MAX, TOOL_OPEN_DOCUMENTATION, + TOOL_AUTO_EXPAND, TOOL_SCENE_EDITABLE_CHILDREN, TOOL_SCENE_USE_PLACEHOLDER, TOOL_SCENE_MAKE_LOCAL, @@ -105,17 +109,21 @@ class SceneTreeDock : public VBoxContainer { int current_option; CreateDialog *create_dialog; +#ifdef MODULE_REGEX_ENABLED RenameDialog *rename_dialog; +#endif // MODULE_REGEX_ENABLED Button *button_add; Button *button_instance; Button *button_create_script; Button *button_detach_script; + MenuButton *button_tree_menu; Button *button_2d; Button *button_3d; Button *button_ui; Button *button_custom; + Button *button_clipboard; HBoxContainer *button_hb; Button *edit_local, *edit_remote; @@ -189,6 +197,7 @@ class SceneTreeDock : public VBoxContainer { void _node_replace_owner(Node *p_base, Node *p_node, Node *p_root, ReplaceOwnerMode p_mode = MODE_BIDI); void _load_request(const String &p_path); void _script_open_request(const Ref<Script> &p_script); + void _push_item(Object *p_object); bool _cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node); bool _track_inherit(const String &p_target_scene_path, Node *p_desired_node); @@ -233,14 +242,13 @@ class SceneTreeDock : public VBoxContainer { void _quick_open(); void _tree_rmb(const Vector2 &p_menu_pos); + void _update_tree_menu(); void _filter_changed(const String &p_filter); void _perform_instantiate_scenes(const Vector<String> &p_files, Node *parent, int p_pos); void _replace_with_branch_scene(const String &p_file, Node *base); - void _file_selected(String p_file); - void _remote_tree_selected(); void _local_tree_selected(); @@ -295,12 +303,14 @@ public: void attach_script_to_selected(bool p_extend); void open_script_dialog(Node *p_for_node, bool p_extend); - void attach_shader_to_selected(); - void open_shader_dialog(Ref<ShaderMaterial> &p_for_material); + void attach_shader_to_selected(int p_preferred_mode = -1); + void open_shader_dialog(Ref<ShaderMaterial> &p_for_material, int p_preferred_mode = -1); void open_add_child_dialog(); void open_instance_child_dialog(); + List<Node *> paste_nodes(); + 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); |