1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Separate Node editor dock

This commit is contained in:
Break
2025-11-08 12:22:34 +08:00
parent 235a32ad11
commit ef9738005a
19 changed files with 268 additions and 223 deletions

View File

@@ -109,7 +109,7 @@
<constant name="FEATURE_SCENE_TREE" value="3" enum="Feature"> <constant name="FEATURE_SCENE_TREE" value="3" enum="Feature">
Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only. Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only.
</constant> </constant>
<constant name="FEATURE_NODE_DOCK" value="4" enum="Feature"> <constant name="FEATURE_NODE_DOCK" value="4" enum="Feature" deprecated="Replaced by the Signals and Groups docks.">
The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor. The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor.
</constant> </constant>
<constant name="FEATURE_FILESYSTEM_DOCK" value="5" enum="Feature"> <constant name="FEATURE_FILESYSTEM_DOCK" value="5" enum="Feature">
@@ -124,7 +124,13 @@
<constant name="FEATURE_GAME" value="8" enum="Feature"> <constant name="FEATURE_GAME" value="8" enum="Feature">
The Game tab, which allows embedding the game window and selecting nodes by clicking inside of it. If this feature is disabled, the Game tab won't display. The Game tab, which allows embedding the game window and selecting nodes by clicking inside of it. If this feature is disabled, the Game tab won't display.
</constant> </constant>
<constant name="FEATURE_MAX" value="9" enum="Feature"> <constant name="FEATURE_SIGNALS_DOCK" value="9" enum="Feature">
The Signals dock. If this feature is disabled, signals won't be visible and modifiable from the editor.
</constant>
<constant name="FEATURE_GROUPS_DOCK" value="10" enum="Feature">
The Groups dock. If this feature is disabled, groups won't be visible and modifiable from the editor.
</constant>
<constant name="FEATURE_MAX" value="11" enum="Feature">
Represents the size of the [enum Feature] enum. Represents the size of the [enum Feature] enum.
</constant> </constant>
</constants> </constants>

View File

@@ -1453,7 +1453,7 @@
If [code]true[/code], the caret will be moved when right-clicking somewhere in the script editor (like when left-clicking or middle-clicking). If [code]false[/code], the caret will only be moved when left-clicking or middle-clicking somewhere. If [code]true[/code], the caret will be moved when right-clicking somewhere in the script editor (like when left-clicking or middle-clicking). If [code]false[/code], the caret will only be moved when left-clicking or middle-clicking somewhere.
</member> </member>
<member name="text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method" type="bool" setter="" getter=""> <member name="text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method" type="bool" setter="" getter="">
If [code]true[/code], opens the script editor when connecting a signal to an existing script method from the Node dock. If [code]true[/code], opens the script editor when connecting a signal to an existing script method from the Signals dock.
</member> </member>
<member name="text_editor/behavior/navigation/scroll_past_end_of_file" type="bool" setter="" getter=""> <member name="text_editor/behavior/navigation/scroll_past_end_of_file" type="bool" setter="" getter="">
If [code]true[/code], allows scrolling past the end of the file. If [code]true[/code], allows scrolling past the end of the file.
@@ -1485,7 +1485,7 @@
If [code]true[/code], automatically adds [url=$DOCS_URL/tutorials/scripting/gdscript/static_typing.html]GDScript static typing[/url] (such as [code]-&gt; void[/code] and [code]: int[/code]) in many situations where it's possible to, including when: If [code]true[/code], automatically adds [url=$DOCS_URL/tutorials/scripting/gdscript/static_typing.html]GDScript static typing[/url] (such as [code]-&gt; void[/code] and [code]: int[/code]) in many situations where it's possible to, including when:
- Accepting a suggestion from code autocompletion; - Accepting a suggestion from code autocompletion;
- Creating a new script from a template; - Creating a new script from a template;
- Connecting signals from the Node dock; - Connecting signals from the Signals dock;
- Creating variables prefixed with [annotation @GDScript.@onready], by dropping nodes from the Scene dock into the script editor while holding [kbd]Ctrl[/kbd]. - Creating variables prefixed with [annotation @GDScript.@onready], by dropping nodes from the Scene dock into the script editor while holding [kbd]Ctrl[/kbd].
</member> </member>
<member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter=""> <member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter="">

View File

@@ -196,7 +196,7 @@
<param index="1" name="persistent" type="bool" default="false" /> <param index="1" name="persistent" type="bool" default="false" />
<description> <description>
Adds the node to the [param group]. Groups can be helpful to organize a subset of nodes, for example [code]"enemies"[/code] or [code]"collectables"[/code]. See notes in the description, and the group methods in [SceneTree]. Adds the node to the [param group]. Groups can be helpful to organize a subset of nodes, for example [code]"enemies"[/code] or [code]"collectables"[/code]. See notes in the description, and the group methods in [SceneTree].
If [param persistent] is [code]true[/code], the group will be stored when saved inside a [PackedScene]. All groups created and displayed in the Node dock are persistent. If [param persistent] is [code]true[/code], the group will be stored when saved inside a [PackedScene]. All groups created and displayed in the Groups dock are persistent.
[b]Note:[/b] To improve performance, the order of group names is [i]not[/i] guaranteed and may vary between project runs. Therefore, do not rely on the group order. [b]Note:[/b] To improve performance, the order of group names is [i]not[/i] guaranteed and may vary between project runs. Therefore, do not rely on the group order.
[b]Note:[/b] [SceneTree]'s group methods will [i]not[/i] work on this node if not inside the tree (see [method is_inside_tree]). [b]Note:[/b] [SceneTree]'s group methods will [i]not[/i] work on this node if not inside the tree (see [method is_inside_tree]).
</description> </description>

View File

@@ -1040,7 +1040,7 @@
Deferred connections trigger their [Callable]s on idle time (at the end of the frame), rather than instantly. Deferred connections trigger their [Callable]s on idle time (at the end of the frame), rather than instantly.
</constant> </constant>
<constant name="CONNECT_PERSIST" value="2" enum="ConnectFlags"> <constant name="CONNECT_PERSIST" value="2" enum="ConnectFlags">
Persisting connections are stored when the object is serialized (such as when using [method PackedScene.pack]). In the editor, connections created through the Node dock are always persisting. Persisting connections are stored when the object is serialized (such as when using [method PackedScene.pack]). In the editor, connections created through the Signals dock are always persisting.
</constant> </constant>
<constant name="CONNECT_ONE_SHOT" value="4" enum="ConnectFlags"> <constant name="CONNECT_ONE_SHOT" value="4" enum="ConnectFlags">
One-shot connections disconnect themselves after emission. One-shot connections disconnect themselves after emission.

View File

@@ -6,7 +6,7 @@
<description> <description>
The [Timer] node is a countdown timer and is the simplest way to handle time-based logic in the engine. When a timer reaches the end of its [member wait_time], it will emit the [signal timeout] signal. The [Timer] node is a countdown timer and is the simplest way to handle time-based logic in the engine. When a timer reaches the end of its [member wait_time], it will emit the [signal timeout] signal.
After a timer enters the scene tree, it can be manually started with [method start]. A timer node is also started automatically if [member autostart] is [code]true[/code]. After a timer enters the scene tree, it can be manually started with [method start]. A timer node is also started automatically if [member autostart] is [code]true[/code].
Without requiring much code, a timer node can be added and configured in the editor. The [signal timeout] signal it emits can also be connected through the Node dock in the editor: Without requiring much code, a timer node can be added and configured in the editor. The [signal timeout] signal it emits can also be connected through the Signals dock in the editor:
[codeblock] [codeblock]
func _on_timer_timeout(): func _on_timer_timeout():
print("Time to attack!") print("Time to attack!")

View File

@@ -0,0 +1,57 @@
/**************************************************************************/
/* groups_dock.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "groups_dock.h"
#include "editor/settings/editor_command_palette.h"
#include "editor/themes/editor_scale.h"
void GroupsDock::set_selection(const Vector<Node *> &p_nodes) {
groups->set_selection(p_nodes);
}
GroupsDock::GroupsDock() {
singleton = this;
set_name(TTRC("Groups"));
set_icon_name("Groups");
set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("docks/open_groups", TTRC("Open Groups Dock")));
set_default_slot(DockConstants::DOCK_SLOT_RIGHT_UL);
VBoxContainer *main_vb = memnew(VBoxContainer);
add_child(main_vb);
groups = memnew(GroupsEditor);
main_vb->add_child(groups);
groups->set_v_size_flags(SIZE_EXPAND_FILL);
}
GroupsDock::~GroupsDock() {
singleton = nullptr;
}

View File

@@ -0,0 +1,50 @@
/**************************************************************************/
/* groups_dock.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#include "editor/docks/editor_dock.h"
#include "editor/docks/groups_editor.h"
class GroupsDock : public EditorDock {
GDCLASS(GroupsDock, EditorDock);
GroupsEditor *groups = nullptr;
static inline GroupsDock *singleton = nullptr;
public:
static GroupsDock *get_singleton() { return singleton; }
void set_selection(const Vector<Node *> &p_nodes);
GroupsDock();
~GroupsDock();
};

View File

@@ -1,137 +0,0 @@
/**************************************************************************/
/* node_dock.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "node_dock.h"
#include "core/io/config_file.h"
#include "editor/scene/connections_dialog.h"
#include "editor/settings/editor_command_palette.h"
#include "editor/themes/editor_scale.h"
void NodeDock::show_groups() {
groups_button->set_pressed(true);
connections_button->set_pressed(false);
groups->show();
connections->hide();
}
void NodeDock::show_connections() {
groups_button->set_pressed(false);
connections_button->set_pressed(true);
groups->hide();
connections->show();
}
void NodeDock::save_layout_to_config(Ref<ConfigFile> &p_layout, const String &p_section) const {
p_layout->set_value(p_section, "current_tab", int(groups_button->is_pressed()));
}
void NodeDock::load_layout_from_config(const Ref<ConfigFile> &p_layout, const String &p_section) {
const int current_tab = p_layout->get_value(p_section, "current_tab", 0);
if (current_tab == 0) {
show_connections();
} else if (current_tab == 1) {
show_groups();
}
}
void NodeDock::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
connections_button->set_button_icon(get_editor_theme_icon(SNAME("Signals")));
groups_button->set_button_icon(get_editor_theme_icon(SNAME("Groups")));
} break;
}
}
void NodeDock::update_lists() {
connections->update_tree();
}
void NodeDock::set_selection(const Vector<Object *> &p_objects) {
connections->set_selection(p_objects);
Vector<Node *> nodes;
for (Object *obj : p_objects) {
Node *n = Object::cast_to<Node>(obj);
if (n) {
nodes.append(n);
}
}
groups->set_selection(nodes);
}
NodeDock::NodeDock() {
singleton = this;
set_name(TTRC("Node"));
set_icon_name("Object");
set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("docks/open_node", TTRC("Open Node Dock")));
set_default_slot(DockConstants::DOCK_SLOT_RIGHT_UL);
VBoxContainer *main_vb = memnew(VBoxContainer);
add_child(main_vb);
mode_hb = memnew(HBoxContainer);
main_vb->add_child(mode_hb);
connections_button = memnew(Button);
connections_button->set_theme_type_variation(SceneStringName(FlatButton));
connections_button->set_text(TTRC("Signals"));
connections_button->set_toggle_mode(true);
connections_button->set_h_size_flags(SIZE_EXPAND_FILL);
connections_button->set_clip_text(true);
mode_hb->add_child(connections_button);
connections_button->connect(SceneStringName(pressed), callable_mp(this, &NodeDock::show_connections));
groups_button = memnew(Button);
groups_button->set_theme_type_variation(SceneStringName(FlatButton));
groups_button->set_text(TTRC("Groups"));
groups_button->set_toggle_mode(true);
groups_button->set_h_size_flags(SIZE_EXPAND_FILL);
groups_button->set_clip_text(true);
mode_hb->add_child(groups_button);
groups_button->connect(SceneStringName(pressed), callable_mp(this, &NodeDock::show_groups));
connections = memnew(ConnectionsDock);
main_vb->add_child(connections);
connections->set_v_size_flags(SIZE_EXPAND_FILL);
connections->hide();
groups = memnew(GroupsEditor);
main_vb->add_child(groups);
groups->set_v_size_flags(SIZE_EXPAND_FILL);
groups->hide();
show_connections();
}
NodeDock::~NodeDock() {
singleton = nullptr;
}

View File

@@ -38,8 +38,9 @@
#include "editor/animation/animation_player_editor_plugin.h" #include "editor/animation/animation_player_editor_plugin.h"
#include "editor/debugger/editor_debugger_node.h" #include "editor/debugger/editor_debugger_node.h"
#include "editor/docks/filesystem_dock.h" #include "editor/docks/filesystem_dock.h"
#include "editor/docks/groups_dock.h"
#include "editor/docks/inspector_dock.h" #include "editor/docks/inspector_dock.h"
#include "editor/docks/node_dock.h" #include "editor/docks/signals_dock.h"
#include "editor/editor_main_screen.h" #include "editor/editor_main_screen.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_string_names.h" #include "editor/editor_string_names.h"
@@ -1351,7 +1352,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
undo_redo->add_undo_method(node, "set_scene_file_path", node->get_scene_file_path()); undo_redo->add_undo_method(node, "set_scene_file_path", node->get_scene_file_path());
_node_replace_owner(node, node, root); _node_replace_owner(node, node, root);
_node_strip_signal_inheritance(node); _node_strip_signal_inheritance(node);
NodeDock::get_singleton()->set_selection(Vector<Object *>{ node }); // Refresh. SignalsDock::get_singleton()->set_object(node); // Refresh.
GroupsDock::get_singleton()->set_selection(Vector<Node *>{ node }); // Refresh.
undo_redo->add_do_method(scene_tree, "update_tree"); undo_redo->add_do_method(scene_tree, "update_tree");
undo_redo->add_undo_method(scene_tree, "update_tree"); undo_redo->add_undo_method(scene_tree, "update_tree");
undo_redo->commit_action(); undo_redo->commit_action();
@@ -2855,7 +2857,8 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
editor_history->cleanup_history(); editor_history->cleanup_history();
InspectorDock::get_singleton()->call("_prepare_history"); InspectorDock::get_singleton()->call("_prepare_history");
InspectorDock::get_singleton()->update(nullptr); InspectorDock::get_singleton()->update(nullptr);
NodeDock::get_singleton()->set_selection(Vector<Object *>{}); SignalsDock::get_singleton()->set_object(nullptr);
GroupsDock::get_singleton()->set_selection(Vector<Node *>());
} }
void SceneTreeDock::_update_script_button() { void SceneTreeDock::_update_script_button() {

View File

@@ -0,0 +1,62 @@
/**************************************************************************/
/* signals_dock.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "signals_dock.h"
#include "editor/scene/connections_dialog.h"
#include "editor/settings/editor_command_palette.h"
#include "editor/themes/editor_scale.h"
void SignalsDock::update_lists() {
connections->update_tree();
}
void SignalsDock::set_object(Object *p_object) {
connections->set_object(p_object);
}
SignalsDock::SignalsDock() {
singleton = this;
set_name(TTRC("Signals"));
set_icon_name("Signals");
set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("docks/open_signals", TTRC("Open Signals Dock")));
set_default_slot(DockConstants::DOCK_SLOT_RIGHT_UL);
VBoxContainer *main_vb = memnew(VBoxContainer);
add_child(main_vb);
connections = memnew(ConnectionsDock);
main_vb->add_child(connections);
connections->set_v_size_flags(SIZE_EXPAND_FILL);
}
SignalsDock::~SignalsDock() {
singleton = nullptr;
}

View File

@@ -1,5 +1,5 @@
/**************************************************************************/ /**************************************************************************/
/* node_dock.h */ /* signals_dock.h */
/**************************************************************************/ /**************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* GODOT ENGINE */
@@ -31,42 +31,23 @@
#pragma once #pragma once
#include "editor/docks/editor_dock.h" #include "editor/docks/editor_dock.h"
#include "groups_editor.h"
class ConfigFile;
class ConnectionsDock; class ConnectionsDock;
class NodeDock : public EditorDock { class SignalsDock : public EditorDock {
GDCLASS(NodeDock, EditorDock); GDCLASS(SignalsDock, EditorDock);
Button *connections_button = nullptr;
Button *groups_button = nullptr;
ConnectionsDock *connections = nullptr; ConnectionsDock *connections = nullptr;
GroupsEditor *groups = nullptr;
HBoxContainer *mode_hb = nullptr; static inline SignalsDock *singleton = nullptr;
private:
inline static NodeDock *singleton = nullptr;
public: public:
static NodeDock *get_singleton() { return singleton; } static SignalsDock *get_singleton() { return singleton; }
protected: void set_object(Object *p_object);
void _notification(int p_what);
virtual void save_layout_to_config(Ref<ConfigFile> &p_layout, const String &p_section) const override;
virtual void load_layout_from_config(const Ref<ConfigFile> &p_layout, const String &p_section) override;
public:
void set_selection(const Vector<Object *> &p_objects);
void show_groups();
void show_connections();
void update_lists(); void update_lists();
NodeDock(); SignalsDock();
~NodeDock(); ~SignalsDock();
}; };

View File

@@ -84,11 +84,12 @@
#include "editor/doc/editor_help.h" #include "editor/doc/editor_help.h"
#include "editor/docks/editor_dock_manager.h" #include "editor/docks/editor_dock_manager.h"
#include "editor/docks/filesystem_dock.h" #include "editor/docks/filesystem_dock.h"
#include "editor/docks/groups_dock.h"
#include "editor/docks/history_dock.h" #include "editor/docks/history_dock.h"
#include "editor/docks/import_dock.h" #include "editor/docks/import_dock.h"
#include "editor/docks/inspector_dock.h" #include "editor/docks/inspector_dock.h"
#include "editor/docks/node_dock.h"
#include "editor/docks/scene_tree_dock.h" #include "editor/docks/scene_tree_dock.h"
#include "editor/docks/signals_dock.h"
#include "editor/editor_data.h" #include "editor/editor_data.h"
#include "editor/editor_interface.h" #include "editor/editor_interface.h"
#include "editor/editor_log.h" #include "editor/editor_log.h"
@@ -2896,7 +2897,8 @@ void EditorNode::push_node_item(Node *p_node) {
void EditorNode::push_item(Object *p_object, const String &p_property, bool p_inspector_only) { void EditorNode::push_item(Object *p_object, const String &p_property, bool p_inspector_only) {
if (!p_object) { if (!p_object) {
InspectorDock::get_inspector_singleton()->edit(nullptr); InspectorDock::get_inspector_singleton()->edit(nullptr);
NodeDock::get_singleton()->set_selection(Vector<Object *>()); SignalsDock::get_singleton()->set_object(nullptr);
GroupsDock::get_singleton()->set_selection(Vector<Node *>());
SceneTreeDock::get_singleton()->set_selected(nullptr); SceneTreeDock::get_singleton()->set_selected(nullptr);
InspectorDock::get_singleton()->update(nullptr); InspectorDock::get_singleton()->update(nullptr);
hide_unused_editors(); hide_unused_editors();
@@ -3007,7 +3009,8 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
if (!current_obj) { if (!current_obj) {
SceneTreeDock::get_singleton()->set_selected(nullptr); SceneTreeDock::get_singleton()->set_selected(nullptr);
InspectorDock::get_inspector_singleton()->edit(nullptr); InspectorDock::get_inspector_singleton()->edit(nullptr);
NodeDock::get_singleton()->set_selection(Vector<Object *>()); SignalsDock::get_singleton()->set_object(nullptr);
GroupsDock::get_singleton()->set_selection(Vector<Node *>());
InspectorDock::get_singleton()->update(nullptr); InspectorDock::get_singleton()->update(nullptr);
EditorDebuggerNode::get_singleton()->clear_remote_tree_selection(); EditorDebuggerNode::get_singleton()->clear_remote_tree_selection();
hide_unused_editors(); hide_unused_editors();
@@ -3041,7 +3044,8 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
if (!p_skip_inspector_update) { if (!p_skip_inspector_update) {
InspectorDock::get_inspector_singleton()->edit(current_res); InspectorDock::get_inspector_singleton()->edit(current_res);
SceneTreeDock::get_singleton()->set_selected(nullptr); SceneTreeDock::get_singleton()->set_selected(nullptr);
NodeDock::get_singleton()->set_selection(Vector<Object *>{ current_res }); SignalsDock::get_singleton()->set_object(current_res);
GroupsDock::get_singleton()->set_selection(Vector<Node *>());
InspectorDock::get_singleton()->update(nullptr); InspectorDock::get_singleton()->update(nullptr);
EditorDebuggerNode::get_singleton()->clear_remote_tree_selection(); EditorDebuggerNode::get_singleton()->clear_remote_tree_selection();
ImportDock::get_singleton()->set_edit_path(current_res->get_path()); ImportDock::get_singleton()->set_edit_path(current_res->get_path());
@@ -3071,7 +3075,8 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
InspectorDock::get_inspector_singleton()->edit(current_node); InspectorDock::get_inspector_singleton()->edit(current_node);
if (current_node->is_inside_tree()) { if (current_node->is_inside_tree()) {
NodeDock::get_singleton()->set_selection(Vector<Object *>{ current_node }); SignalsDock::get_singleton()->set_object(current_node);
GroupsDock::get_singleton()->set_selection(Vector<Node *>{ current_node });
SceneTreeDock::get_singleton()->set_selected(current_node); SceneTreeDock::get_singleton()->set_selected(current_node);
SceneTreeDock::get_singleton()->set_selection({ current_node }); SceneTreeDock::get_singleton()->set_selection({ current_node });
InspectorDock::get_singleton()->update(current_node); InspectorDock::get_singleton()->update(current_node);
@@ -3083,7 +3088,8 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
} }
} }
} else { } else {
NodeDock::get_singleton()->set_selection(Vector<Object *>()); SignalsDock::get_singleton()->set_object(nullptr);
GroupsDock::get_singleton()->set_selection(Vector<Node *>());
SceneTreeDock::get_singleton()->set_selected(nullptr); SceneTreeDock::get_singleton()->set_selected(nullptr);
InspectorDock::get_singleton()->update(nullptr); InspectorDock::get_singleton()->update(nullptr);
} }
@@ -3130,15 +3136,9 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
EditorDebuggerNode::get_singleton()->clear_remote_tree_selection(); EditorDebuggerNode::get_singleton()->clear_remote_tree_selection();
} }
// TODO: This can be replaced by some casting operator.
Vector<Object *> nodes_as_objects;
nodes_as_objects.reserve_exact(multi_nodes.size());
for (Node *n : multi_nodes) {
nodes_as_objects.append(n);
}
InspectorDock::get_inspector_singleton()->edit(current_obj); InspectorDock::get_inspector_singleton()->edit(current_obj);
NodeDock::get_singleton()->set_selection(nodes_as_objects); SignalsDock::get_singleton()->set_object(nullptr);
GroupsDock::get_singleton()->set_selection(multi_nodes);
SceneTreeDock::get_singleton()->set_selected(selected_node); SceneTreeDock::get_singleton()->set_selected(selected_node);
SceneTreeDock::get_singleton()->set_selection(multi_nodes); SceneTreeDock::get_singleton()->set_selection(multi_nodes);
InspectorDock::get_singleton()->update(nullptr); InspectorDock::get_singleton()->update(nullptr);
@@ -7574,7 +7574,8 @@ void EditorNode::_resource_loaded(Ref<Resource> p_resource, const String &p_path
void EditorNode::_feature_profile_changed() { void EditorNode::_feature_profile_changed() {
Ref<EditorFeatureProfile> profile = feature_profile_manager->get_current_profile(); Ref<EditorFeatureProfile> profile = feature_profile_manager->get_current_profile();
if (profile.is_valid()) { if (profile.is_valid()) {
editor_dock_manager->set_dock_enabled(NodeDock::get_singleton(), !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_NODE_DOCK)); editor_dock_manager->set_dock_enabled(SignalsDock::get_singleton(), !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SIGNALS_DOCK));
editor_dock_manager->set_dock_enabled(GroupsDock::get_singleton(), !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_GROUPS_DOCK));
// The Import dock is useless without the FileSystem dock. Ensure the configuration is valid. // The Import dock is useless without the FileSystem dock. Ensure the configuration is valid.
bool fs_dock_disabled = profile->is_feature_disabled(EditorFeatureProfile::FEATURE_FILESYSTEM_DOCK); bool fs_dock_disabled = profile->is_feature_disabled(EditorFeatureProfile::FEATURE_FILESYSTEM_DOCK);
editor_dock_manager->set_dock_enabled(FileSystemDock::get_singleton(), !fs_dock_disabled); editor_dock_manager->set_dock_enabled(FileSystemDock::get_singleton(), !fs_dock_disabled);
@@ -7591,7 +7592,8 @@ void EditorNode::_feature_profile_changed() {
} }
} else { } else {
editor_dock_manager->set_dock_enabled(ImportDock::get_singleton(), true); editor_dock_manager->set_dock_enabled(ImportDock::get_singleton(), true);
editor_dock_manager->set_dock_enabled(NodeDock::get_singleton(), true); editor_dock_manager->set_dock_enabled(SignalsDock::get_singleton(), true);
editor_dock_manager->set_dock_enabled(GroupsDock::get_singleton(), true);
editor_dock_manager->set_dock_enabled(FileSystemDock::get_singleton(), true); editor_dock_manager->set_dock_enabled(FileSystemDock::get_singleton(), true);
editor_dock_manager->set_dock_enabled(history_dock, true); editor_dock_manager->set_dock_enabled(history_dock, true);
editor_main_screen->set_button_enabled(EditorMainScreen::EDITOR_3D, true); editor_main_screen->set_button_enabled(EditorMainScreen::EDITOR_3D, true);
@@ -8749,15 +8751,18 @@ EditorNode::EditorNode() {
memnew(InspectorDock(editor_data)); memnew(InspectorDock(editor_data));
editor_dock_manager->add_dock(InspectorDock::get_singleton()); editor_dock_manager->add_dock(InspectorDock::get_singleton());
memnew(NodeDock); memnew(SignalsDock);
editor_dock_manager->add_dock(NodeDock::get_singleton()); editor_dock_manager->add_dock(SignalsDock::get_singleton());
memnew(GroupsDock);
editor_dock_manager->add_dock(GroupsDock::get_singleton());
history_dock = memnew(HistoryDock); history_dock = memnew(HistoryDock);
editor_dock_manager->add_dock(history_dock); editor_dock_manager->add_dock(history_dock);
// Add some offsets to left_r and main hsplits to make LEFT_R and RIGHT_L docks wider than minsize. // Add some offsets to left_r and main hsplits to make LEFT_R and RIGHT_L docks wider than minsize.
left_r_hsplit->set_split_offset(270 * EDSCALE); left_r_hsplit->set_split_offset(270 * EDSCALE);
main_hsplit->set_split_offset(-270 * EDSCALE); main_hsplit->set_split_offset(-360 * EDSCALE);
// Define corresponding default layout. // Define corresponding default layout.
@@ -8766,7 +8771,7 @@ EditorNode::EditorNode() {
// Dock numbers are based on DockSlot enum value + 1. // Dock numbers are based on DockSlot enum value + 1.
default_layout->set_value(docks_section, "dock_3", "Scene,Import"); default_layout->set_value(docks_section, "dock_3", "Scene,Import");
default_layout->set_value(docks_section, "dock_4", "FileSystem"); default_layout->set_value(docks_section, "dock_4", "FileSystem");
default_layout->set_value(docks_section, "dock_5", "Inspector,Node,History"); default_layout->set_value(docks_section, "dock_5", "Inspector,Signals,Groups,History");
int hsplits[] = { 0, 270, -270, 0 }; int hsplits[] = { 0, 270, -270, 0 };
DEV_ASSERT((int)std_size(hsplits) == editor_dock_manager->get_hsplit_count()); DEV_ASSERT((int)std_size(hsplits) == editor_dock_manager->get_hsplit_count());

View File

@@ -33,8 +33,8 @@
#include "core/config/project_settings.h" #include "core/config/project_settings.h"
#include "core/templates/hash_set.h" #include "core/templates/hash_set.h"
#include "editor/doc/editor_help.h" #include "editor/doc/editor_help.h"
#include "editor/docks/node_dock.h"
#include "editor/docks/scene_tree_dock.h" #include "editor/docks/scene_tree_dock.h"
#include "editor/docks/signals_dock.h"
#include "editor/editor_main_screen.h" #include "editor/editor_main_screen.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_string_names.h" #include "editor/editor_string_names.h"
@@ -1503,16 +1503,15 @@ void ConnectionsDock::_bind_methods() {
ClassDB::bind_method("update_tree", &ConnectionsDock::update_tree); ClassDB::bind_method("update_tree", &ConnectionsDock::update_tree);
} }
void ConnectionsDock::set_selection(const Vector<Object *> &p_objects) { void ConnectionsDock::set_object(Object *p_object) {
if (p_objects.size() != 1) { if (p_object == nullptr) {
select_a_node->show(); select_an_object->show();
holder->hide(); holder->hide();
selected_object = nullptr;
} else { } else {
select_a_node->hide(); select_an_object->hide();
holder->show(); holder->show();
selected_object = p_objects[0];
} }
selected_object = p_object;
is_editing_resource = (Object::cast_to<Resource>(selected_object) != nullptr); is_editing_resource = (Object::cast_to<Resource>(selected_object) != nullptr);
update_tree(); update_tree();
} }
@@ -1779,13 +1778,13 @@ ConnectionsDock::ConnectionsDock() {
add_theme_constant_override("separation", 3 * EDSCALE); add_theme_constant_override("separation", 3 * EDSCALE);
select_a_node = memnew(Label); select_an_object = memnew(Label);
select_a_node->set_focus_mode(FOCUS_ACCESSIBILITY); select_an_object->set_focus_mode(FOCUS_ACCESSIBILITY);
select_a_node->set_text(TTRC("Select a single node or resource to edit its signals.")); select_an_object->set_text(TTRC("Select a single node or resource to edit its signals."));
select_a_node->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); select_an_object->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
select_a_node->set_v_size_flags(SIZE_EXPAND_FILL); select_an_object->set_v_size_flags(SIZE_EXPAND_FILL);
select_a_node->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER); select_an_object->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
select_a_node->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); select_an_object->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
select_a_node->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART); select_an_object->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
add_child(select_a_node); add_child(select_an_object);
} }

View File

@@ -238,7 +238,7 @@ class ConnectionsDock : public VBoxContainer {
}; };
VBoxContainer *holder = nullptr; VBoxContainer *holder = nullptr;
Label *select_a_node = nullptr; Label *select_an_object = nullptr;
Object *selected_object = nullptr; Object *selected_object = nullptr;
ConnectionsDockTree *tree = nullptr; ConnectionsDockTree *tree = nullptr;
@@ -285,7 +285,7 @@ protected:
static void _bind_methods(); static void _bind_methods();
public: public:
void set_selection(const Vector<Object *> &p_objects); void set_object(Object *p_object);
void update_tree(); void update_tree();
ConnectionsDock(); ConnectionsDock();

View File

@@ -34,7 +34,8 @@
#include "core/object/script_language.h" #include "core/object/script_language.h"
#include "editor/animation/animation_player_editor_plugin.h" #include "editor/animation/animation_player_editor_plugin.h"
#include "editor/docks/editor_dock_manager.h" #include "editor/docks/editor_dock_manager.h"
#include "editor/docks/node_dock.h" #include "editor/docks/groups_dock.h"
#include "editor/docks/signals_dock.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_string_names.h" #include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h" #include "editor/editor_undo_redo_manager.h"
@@ -194,16 +195,14 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
set_selected(n); set_selected(n);
EditorDockManager::get_singleton()->focus_dock(NodeDock::get_singleton()); EditorDockManager::get_singleton()->focus_dock(SignalsDock::get_singleton());
NodeDock::get_singleton()->show_connections();
} else if (p_id == BUTTON_GROUPS) { } else if (p_id == BUTTON_GROUPS) {
editor_selection->clear(); editor_selection->clear();
editor_selection->add_node(n); editor_selection->add_node(n);
set_selected(n); set_selected(n);
EditorDockManager::get_singleton()->focus_dock(NodeDock::get_singleton()); EditorDockManager::get_singleton()->focus_dock(GroupsDock::get_singleton());
NodeDock::get_singleton()->show_groups();
} else if (p_id == BUTTON_UNIQUE) { } else if (p_id == BUTTON_UNIQUE) {
bool ask_before_revoking_unique_name = EDITOR_GET("docks/scene_tree/ask_before_revoking_unique_name"); bool ask_before_revoking_unique_name = EDITOR_GET("docks/scene_tree/ask_before_revoking_unique_name");
revoke_node = n; revoke_node = n;

View File

@@ -45,7 +45,7 @@
#include "editor/doc/editor_help_search.h" #include "editor/doc/editor_help_search.h"
#include "editor/docks/filesystem_dock.h" #include "editor/docks/filesystem_dock.h"
#include "editor/docks/inspector_dock.h" #include "editor/docks/inspector_dock.h"
#include "editor/docks/node_dock.h" #include "editor/docks/signals_dock.h"
#include "editor/editor_interface.h" #include "editor/editor_interface.h"
#include "editor/editor_main_screen.h" #include "editor/editor_main_screen.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
@@ -3022,7 +3022,7 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const
break; break;
} }
// Move back to the previously edited node to reselect it in the Inspector and the NodeDock. // Move back to the previously edited node to reselect it in the Inspector and the SignalsDock.
// We assume that the previous item is the node on which the callbacks were added. // We assume that the previous item is the node on which the callbacks were added.
EditorNode::get_singleton()->edit_previous_item(); EditorNode::get_singleton()->edit_previous_item();
} }
@@ -4009,7 +4009,7 @@ void ScriptEditor::register_create_script_editor_function(CreateScriptEditorFunc
} }
void ScriptEditor::_script_changed() { void ScriptEditor::_script_changed() {
NodeDock::get_singleton()->update_lists(); SignalsDock::get_singleton()->update_lists();
} }
void ScriptEditor::_on_replace_in_files_requested(const String &text) { void ScriptEditor::_on_replace_in_files_requested(const String &text) {

View File

@@ -47,11 +47,15 @@ const char *EditorFeatureProfile::feature_names[FEATURE_MAX] = {
TTRC("Script Editor"), TTRC("Script Editor"),
TTRC("Asset Library"), TTRC("Asset Library"),
TTRC("Scene Tree Editing"), TTRC("Scene Tree Editing"),
TTRC("Node Dock"), #ifndef DISABLE_DEPRECATED
TTRC("Node Dock (deprecated)"),
#endif
TTRC("FileSystem Dock"), TTRC("FileSystem Dock"),
TTRC("Import Dock"), TTRC("Import Dock"),
TTRC("History Dock"), TTRC("History Dock"),
TTRC("Game View"), TTRC("Game View"),
TTRC("Signals Dock"),
TTRC("Groups Dock"),
}; };
const char *EditorFeatureProfile::feature_descriptions[FEATURE_MAX] = { const char *EditorFeatureProfile::feature_descriptions[FEATURE_MAX] = {
@@ -59,11 +63,15 @@ const char *EditorFeatureProfile::feature_descriptions[FEATURE_MAX] = {
TTRC("Allows to edit scripts using the integrated script editor."), TTRC("Allows to edit scripts using the integrated script editor."),
TTRC("Provides built-in access to the Asset Library."), TTRC("Provides built-in access to the Asset Library."),
TTRC("Allows editing the node hierarchy in the Scene dock."), TTRC("Allows editing the node hierarchy in the Scene dock."),
#ifndef DISABLE_DEPRECATED
TTRC("Allows to work with signals and groups of the node selected in the Scene dock."), TTRC("Allows to work with signals and groups of the node selected in the Scene dock."),
#endif
TTRC("Allows to browse the local file system via a dedicated dock."), TTRC("Allows to browse the local file system via a dedicated dock."),
TTRC("Allows to configure import settings for individual assets. Requires the FileSystem dock to function."), TTRC("Allows to configure import settings for individual assets. Requires the FileSystem dock to function."),
TTRC("Provides an overview of the editor's and each scene's undo history."), TTRC("Provides an overview of the editor's and each scene's undo history."),
TTRC("Provides tools for selecting and debugging nodes at runtime."), TTRC("Provides tools for selecting and debugging nodes at runtime."),
TTRC("Allows to work with signals of the node selected in the Scene dock."),
TTRC("Allows to manage groups of the node selected in the Scene dock."),
}; };
const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = { const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = {
@@ -71,11 +79,15 @@ const char *EditorFeatureProfile::feature_identifiers[FEATURE_MAX] = {
"script", "script",
"asset_lib", "asset_lib",
"scene_tree", "scene_tree",
#ifndef DISABLE_DEPRECATED
"node_dock", "node_dock",
#endif
"filesystem_dock", "filesystem_dock",
"import_dock", "import_dock",
"history_dock", "history_dock",
"game", "game",
"signals_dock",
"groups_dock",
}; };
void EditorFeatureProfile::set_disable_class(const StringName &p_class, bool p_disabled) { void EditorFeatureProfile::set_disable_class(const StringName &p_class, bool p_disabled) {
@@ -308,11 +320,15 @@ void EditorFeatureProfile::_bind_methods() {
BIND_ENUM_CONSTANT(FEATURE_SCRIPT); BIND_ENUM_CONSTANT(FEATURE_SCRIPT);
BIND_ENUM_CONSTANT(FEATURE_ASSET_LIB); BIND_ENUM_CONSTANT(FEATURE_ASSET_LIB);
BIND_ENUM_CONSTANT(FEATURE_SCENE_TREE); BIND_ENUM_CONSTANT(FEATURE_SCENE_TREE);
#ifndef DISABLE_DEPRECATED
BIND_ENUM_CONSTANT(FEATURE_NODE_DOCK); BIND_ENUM_CONSTANT(FEATURE_NODE_DOCK);
#endif
BIND_ENUM_CONSTANT(FEATURE_FILESYSTEM_DOCK); BIND_ENUM_CONSTANT(FEATURE_FILESYSTEM_DOCK);
BIND_ENUM_CONSTANT(FEATURE_IMPORT_DOCK); BIND_ENUM_CONSTANT(FEATURE_IMPORT_DOCK);
BIND_ENUM_CONSTANT(FEATURE_HISTORY_DOCK); BIND_ENUM_CONSTANT(FEATURE_HISTORY_DOCK);
BIND_ENUM_CONSTANT(FEATURE_GAME); BIND_ENUM_CONSTANT(FEATURE_GAME);
BIND_ENUM_CONSTANT(FEATURE_SIGNALS_DOCK);
BIND_ENUM_CONSTANT(FEATURE_GROUPS_DOCK);
BIND_ENUM_CONSTANT(FEATURE_MAX); BIND_ENUM_CONSTANT(FEATURE_MAX);
} }

View File

@@ -48,11 +48,15 @@ public:
FEATURE_SCRIPT, FEATURE_SCRIPT,
FEATURE_ASSET_LIB, FEATURE_ASSET_LIB,
FEATURE_SCENE_TREE, FEATURE_SCENE_TREE,
#ifndef DISABLE_DEPRECATED
FEATURE_NODE_DOCK, FEATURE_NODE_DOCK,
#endif
FEATURE_FILESYSTEM_DOCK, FEATURE_FILESYSTEM_DOCK,
FEATURE_IMPORT_DOCK, FEATURE_IMPORT_DOCK,
FEATURE_HISTORY_DOCK, FEATURE_HISTORY_DOCK,
FEATURE_GAME, FEATURE_GAME,
FEATURE_SIGNALS_DOCK,
FEATURE_GROUPS_DOCK,
FEATURE_MAX FEATURE_MAX
}; };

View File

@@ -60,7 +60,7 @@
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "editor/docks/inspector_dock.h" #include "editor/docks/inspector_dock.h"
#include "editor/docks/node_dock.h" #include "editor/docks/signals_dock.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/file_system/editor_file_system.h" #include "editor/file_system/editor_file_system.h"
#include "editor/settings/editor_settings.h" #include "editor/settings/editor_settings.h"
@@ -1030,7 +1030,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
// FIXME: Hack to refresh editor in order to display new properties and signals. See if there is a better alternative. // FIXME: Hack to refresh editor in order to display new properties and signals. See if there is a better alternative.
if (Engine::get_singleton()->is_editor_hint()) { if (Engine::get_singleton()->is_editor_hint()) {
InspectorDock::get_inspector_singleton()->update_tree(); InspectorDock::get_inspector_singleton()->update_tree();
NodeDock::get_singleton()->update_lists(); SignalsDock::get_singleton()->update_lists();
} }
#endif #endif
} }