diff --git a/game/addons/paint_canvas/color_grid_inxpector_plugin.gd b/game/addons/paint_canvas/color_grid_inxpector_plugin.gd index 47698e2..18f499c 100644 --- a/game/addons/paint_canvas/color_grid_inxpector_plugin.gd +++ b/game/addons/paint_canvas/color_grid_inxpector_plugin.gd @@ -4,6 +4,7 @@ extends EditorInspectorPlugin func can_handle(object: Object) -> bool: return object is PaintNode - func parse_begin(object: Object) -> void: - add_custom_control(PaintColorGrid.new()) + var pc : PaintColorGrid = PaintColorGrid.new() + pc.on_paint_node_selected(object) + add_custom_control(pc) diff --git a/game/addons/paint_canvas/plugin.gd b/game/addons/paint_canvas/plugin.gd index e243197..5ffc360 100644 --- a/game/addons/paint_canvas/plugin.gd +++ b/game/addons/paint_canvas/plugin.gd @@ -20,10 +20,10 @@ func _enter_tree() -> void: #get_tree().connect("node_removed", self, "on_node_removed") - var paint_editor_plugin : EditorPlugin = Engine.get_global("PaintEditorPlugin") - - if paint_editor_plugin: - var sidebar : PaintSidebar = paint_editor_plugin.get_sidebar() +# var paint_editor_plugin : EditorPlugin = Engine.get_global("PaintEditorPlugin") +# +# if paint_editor_plugin: +# var sidebar : PaintSidebar = paint_editor_plugin.get_sidebar() #print(sidebar) @@ -31,9 +31,9 @@ func _exit_tree() -> void: if ip: remove_inspector_plugin(ip) - var paint_editor_plugin : EditorPlugin = Engine.get_global("PaintEditorPlugin") - - if paint_editor_plugin: - var sidebar : PaintSidebar = paint_editor_plugin.get_sidebar() +# var paint_editor_plugin : EditorPlugin = Engine.get_global("PaintEditorPlugin") +# +# if paint_editor_plugin: +# var sidebar : PaintSidebar = paint_editor_plugin.get_sidebar() #print(sidebar)