aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index a34aebc63..83f1cd40b 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -66,6 +66,7 @@
#include "editor/import/resource_importer_scene.h"
#include "editor/import/resource_importer_texture.h"
#include "editor/import/resource_importer_wav.h"
+#include "editor/plugins/animation_blend_space_editor.h"
#include "editor/plugins/animation_blend_tree_editor_plugin.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
@@ -1308,7 +1309,11 @@ bool EditorNode::item_has_editor(Object *p_object) {
void EditorNode::edit_item(Object *p_object) {
- Vector<EditorPlugin *> sub_plugins = editor_data.get_subeditors(p_object);
+ Vector<EditorPlugin *> sub_plugins;
+
+ if (p_object) {
+ sub_plugins = editor_data.get_subeditors(p_object);
+ }
if (!sub_plugins.empty()) {
_display_top_editors(false);
@@ -1316,6 +1321,8 @@ void EditorNode::edit_item(Object *p_object) {
_set_top_editors(sub_plugins);
_set_editing_top_editors(p_object);
_display_top_editors(true);
+ } else {
+ _hide_top_editors();
}
}
@@ -5371,8 +5378,6 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(SpatialEditorPlugin(this)));
add_editor_plugin(memnew(ScriptEditorPlugin(this)));
- add_editor_plugin(memnew(AnimationNodeBlendTreeEditorPlugin(this)));
-
EditorAudioBuses *audio_bus_editor = EditorAudioBuses::register_editor();
ScriptTextEditor::register_editor(); //register one for text scripts
@@ -5394,6 +5399,8 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(ShaderEditorPlugin(this)));
// FIXME: Disabled for Godot 3.0 as made incompatible, it needs to be ported to the new API.
//add_editor_plugin(memnew(ShaderGraphEditorPlugin(this)));
+ add_editor_plugin(memnew(AnimationNodeBlendTreeEditorPlugin(this)));
+ add_editor_plugin(memnew(AnimationNodeBlendSpaceEditorPlugin(this)));
add_editor_plugin(memnew(CameraEditorPlugin(this)));
add_editor_plugin(memnew(ThemeEditorPlugin(this)));