From 0963538827e91157b395dd961dc8dff727d2b3dd Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 15 Nov 2022 17:33:09 +0100 Subject: [PATCH] Added the new PaintEditorPlugin as an engine global. --- modules/paint/paint_editor_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/paint/paint_editor_plugin.cpp b/modules/paint/paint_editor_plugin.cpp index ab3ad1212..5dcd552ea 100644 --- a/modules/paint/paint_editor_plugin.cpp +++ b/modules/paint/paint_editor_plugin.cpp @@ -22,6 +22,8 @@ SOFTWARE. #include "paint_editor_plugin.h" +#include "core/config/engine.h" + void PaintEditorPlugin::make_visible(const bool visible) { } @@ -33,9 +35,12 @@ PaintEditorPlugin::PaintEditorPlugin(EditorNode *p_node) { editor = p_node; make_visible(false); + + Engine::get_singleton()->add_global("PaintEditorPlugin", this); } PaintEditorPlugin::~PaintEditorPlugin() { + Engine::get_singleton()->remove_global("PaintEditorPlugin"); } void PaintEditorPlugin::_bind_methods() {