Added custom Paint, Web, and Mesh (MDI) nodes to the SceneTreeDock.

This commit is contained in:
Relintai 2022-11-20 23:16:20 +01:00
parent a286c2ecd9
commit 6c0008a912
3 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,7 @@ SOFTWARE.
#include "mdi_ed.h"
#include "mdi_gizmo.h"
#include "mdi_gizmo_plugin.h"
#include "editor/editor_node.h"
bool MDIEdPlugin::handles(Object *object) const {
if (object->is_class("MeshDataInstance")) {
@ -500,6 +501,8 @@ MDIEdPlugin::MDIEdPlugin(EditorNode *p_node) {
gizmo_plugin.instance();
gizmo_plugin->plugin = this;
add_spatial_gizmo_plugin(gizmo_plugin);
editor->get_scene_tree_dock()->add_custom_scene_root_class("Mesh", "MeshDataInstance");
}
MDIEdPlugin::~MDIEdPlugin() {

View File

@ -23,6 +23,7 @@ SOFTWARE.
#include "paint_editor_plugin.h"
#include "core/config/engine.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
@ -74,6 +75,8 @@ PaintEditorPlugin::PaintEditorPlugin(EditorNode *p_node) {
_inspector_plugin = memnew(PaintInspectorPlugin);
add_inspector_plugin(_inspector_plugin);
editor->get_scene_tree_dock()->add_custom_scene_root_class("Paint", "PaintCanvas");
}
PaintEditorPlugin::~PaintEditorPlugin() {

View File

@ -142,6 +142,8 @@ WebNodeEditorPlugin::WebNodeEditorPlugin(EditorNode *p_node) {
_scene_has_webnode = false;
Engine::get_singleton()->add_global("WebNodeEditor", window);
editor->get_scene_tree_dock()->add_custom_scene_root_class("Web", "WebNode");
}
WebNodeEditorPlugin::~WebNodeEditorPlugin() {