diff options
Diffstat (limited to 'editor/scene_tree_dock.h')
-rw-r--r-- | editor/scene_tree_dock.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index a1d300d3d6..54e6108d84 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -105,7 +105,6 @@ class SceneTreeDock : public VBoxContainer { Vector<ObjectID> subresources; - bool restore_script_editor_on_drag = false; bool reset_create_dialog = false; int current_option = 0; @@ -145,7 +144,7 @@ class SceneTreeDock : public VBoxContainer { List<Node *> node_clipboard; String clipboard_source_scene; - HashMap<String, Map<Ref<Resource>, Ref<Resource>>> clipboard_resource_remap; + HashMap<String, HashMap<Ref<Resource>, Ref<Resource>>> clipboard_resource_remap; ScriptCreateDialog *script_create_dialog = nullptr; ShaderCreateDialog *shader_create_dialog = nullptr; @@ -172,6 +171,7 @@ class SceneTreeDock : public VBoxContainer { void _do_create(Node *p_parent); Node *scene_root = nullptr; Node *edited_scene = nullptr; + Node *pending_click_select = nullptr; VBoxContainer *create_root_dialog = nullptr; String selected_favorite_root; @@ -198,6 +198,7 @@ class SceneTreeDock : public VBoxContainer { void _load_request(const String &p_path); void _script_open_request(const Ref<Script> &p_script); void _push_item(Object *p_object); + void _handle_select(Node *p_node); 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); @@ -232,7 +233,7 @@ class SceneTreeDock : public VBoxContainer { void _selection_changed(); void _update_script_button(); - void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, Map<Node *, NodePath> *p_renames); + void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, HashMap<Node *, NodePath> *p_renames); void _normalize_drop(Node *&to_node, int &to_pos, int p_type); @@ -258,16 +259,16 @@ class SceneTreeDock : public VBoxContainer { void _feature_profile_changed(); void _clear_clipboard(); - void _create_remap_for_node(Node *p_node, Map<Ref<Resource>, Ref<Resource>> &r_remap); - void _create_remap_for_resource(Ref<Resource> p_resource, Map<Ref<Resource>, Ref<Resource>> &r_remap); + void _create_remap_for_node(Node *p_node, HashMap<Ref<Resource>, Ref<Resource>> &r_remap); + void _create_remap_for_resource(Ref<Resource> p_resource, HashMap<Ref<Resource>, Ref<Resource>> &r_remap); bool profile_allow_editing = true; bool profile_allow_script_editing = true; static void _update_configuration_warning(); - bool _update_node_path(Node *p_root_node, NodePath &r_node_path, Map<Node *, NodePath> *p_renames) const; - bool _check_node_path_recursive(Node *p_root_node, Variant &r_variant, Map<Node *, NodePath> *p_renames) const; + bool _update_node_path(Node *p_root_node, NodePath &r_node_path, HashMap<Node *, NodePath> *p_renames) const; + bool _check_node_path_recursive(Node *p_root_node, Variant &r_variant, HashMap<Node *, NodePath> *p_renames) const; private: static SceneTreeDock *singleton; @@ -292,8 +293,8 @@ public: void instantiate(const String &p_file); void instantiate_scenes(const Vector<String> &p_files, Node *p_parent = nullptr); void set_selected(Node *p_node, bool p_emit_selected = false); - void fill_path_renames(Node *p_node, Node *p_new_parent, Map<Node *, NodePath> *p_renames); - void perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims = nullptr); + void fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames); + void perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, HashSet<int>> *r_rem_anims = nullptr); SceneTreeEditor *get_tree_editor() { return scene_tree; } EditorData *get_editor_data() { return editor_data; } @@ -317,7 +318,9 @@ public: List<Node *> paste_nodes(); List<Node *> get_node_clipboard() const; - ScriptCreateDialog *get_script_create_dialog() { return script_create_dialog; } + ScriptCreateDialog *get_script_create_dialog() { + return script_create_dialog; + } SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data); ~SceneTreeDock(); |