From cc33c528eba7de158f5610fa884145fffc8df1c6 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 11 Oct 2016 23:54:46 +0900 Subject: Replace a node with saved branch scene instance --- tools/editor/scene_tree_dock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/editor/scene_tree_dock.h') diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h index 971013a568..8933a03883 100644 --- a/tools/editor/scene_tree_dock.h +++ b/tools/editor/scene_tree_dock.h @@ -153,6 +153,7 @@ class SceneTreeDock : public VBoxContainer { void _filter_changed(const String& p_filter); void _perform_instance_scenes(const Vector& p_files,Node* parent,int p_pos); + void _replace_with_branch_scene(const String& p_file,Node* base); protected: -- cgit v1.2.3 From 41329f9750379b3c2e506d1e9ed7f6195c812920 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Wed, 19 Oct 2016 21:26:14 +0200 Subject: Option to load script for node (#6839) --- tools/editor/scene_tree_dock.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/editor/scene_tree_dock.h') diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h index 8933a03883..ddd28cfd2d 100644 --- a/tools/editor/scene_tree_dock.h +++ b/tools/editor/scene_tree_dock.h @@ -58,7 +58,8 @@ class SceneTreeDock : public VBoxContainer { TOOL_REPLACE, TOOL_CONNECT, TOOL_GROUP, - TOOL_SCRIPT, + TOOL_CREATE_SCRIPT, + TOOL_LOAD_SCRIPT, TOOL_MOVE_UP, TOOL_MOVE_DOWN, TOOL_DUPLICATE, @@ -75,10 +76,12 @@ class SceneTreeDock : public VBoxContainer { int current_option; CreateDialog *create_dialog; + EditorFileDialog *file_dialog; ToolButton *button_add; ToolButton *button_instance; ToolButton *button_create_script; + ToolButton *button_load_script; SceneTreeEditor *scene_tree; @@ -155,6 +158,7 @@ class SceneTreeDock : public VBoxContainer { void _perform_instance_scenes(const Vector& p_files,Node* parent,int p_pos); void _replace_with_branch_scene(const String& p_file,Node* base); + void _file_selected(String p_file); protected: void _notification(int p_what); -- cgit v1.2.3 From eed9179ea30deaf4b4fa7348bbe54904a165eb55 Mon Sep 17 00:00:00 2001 From: volzhs Date: Wed, 26 Oct 2016 04:27:24 +0900 Subject: Improve drag and drop on 2D viewport --- tools/editor/scene_tree_dock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/editor/scene_tree_dock.h') diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h index 8933a03883..471247dab6 100644 --- a/tools/editor/scene_tree_dock.h +++ b/tools/editor/scene_tree_dock.h @@ -174,7 +174,7 @@ public: void fill_path_renames(Node* p_node, Node *p_new_parent, List > *p_renames); void perform_node_renames(Node* p_base,List > *p_renames, Map, Set > *r_rem_anims=NULL); SceneTreeEditor *get_tree_editor() { return scene_tree; } - + EditorData *get_editor_data() { return editor_data; } void open_script_dialog(Node* p_for_node); SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelection *p_editor_selection,EditorData &p_editor_data); -- cgit v1.2.3 From a3944e66dac9eda11b80fe0598db0ef7c207155c Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Thu, 27 Oct 2016 16:32:41 +0200 Subject: Ability to drag script files from Filesystem dock to SceneTree dock. Allows to attach scripts by dragging them onto the target Node. --- tools/editor/scene_tree_dock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/editor/scene_tree_dock.h') diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h index 8933a03883..ad205af770 100644 --- a/tools/editor/scene_tree_dock.h +++ b/tools/editor/scene_tree_dock.h @@ -147,6 +147,7 @@ class SceneTreeDock : public VBoxContainer { void _nodes_dragged(Array p_nodes,NodePath p_to,int p_type); void _files_dropped(Vector p_files,NodePath p_to,int p_type); + void _script_dropped(String p_file, NodePath p_to); void _tree_rmb(const Vector2& p_menu_pos); -- cgit v1.2.3