I am creating a GraphEdit plugin that operates as a main screen plugin. The problem I am having is getting the inspector to inspect my selected node.
I’ve tried using inspect object on the node but that jumps Godot out of the plugin and into the 2D screen. Very undesirable.
Is there a way to make the current inspector work as I intend or is there a way to essentially copy the inspector and make a dock plugin representing another inspector?
I couldn’t find editornode but I did find EditorInterface.Singleton.EditNode. However, that had the same result as inspect object where it would jump to the 2D screen.
Usually you don’t want to inspect the node. Instead, create a custom resource type and store all the data that needs to be edited by users in that custom resource. Inspecting resources should not open any 2d/3d view.
It also comes with the added benefit that you can neatly separate your data handling code from your graph logic code.
That’s exactly what i needed. The funny thing was I had all the data wrapped in a custom resource. face palm
So all I had to do was change it fromEditorInterface.Singleton.EditNode(Node a_node) to EditorInterface.Singleton.EditResource(Node.CustomResource)