#editor: showing two inspectors, or inspecting child node

1 messages · Page 1 of 1 (latest)

quasi loom
#

in the editor, is there any way of showing two inspector docs? (for different objects) or if not, is there a way to show a child node's inspector contents inside of a parent?

tepid hawk
#

As far as I understand it, no, the Inspector works by retrieving the Class type and it's properties from ClassDB (on the C++ source code), it then creates control elements for each one of it's attributes that listen for signals to update the properties, this happens on the update_tree function from the EditorInspector class (on the C++ source...), this means the editor sets the state of the Inspector based on the selection of nodes (on the scene tree on the left of the editor) which means it will only display information for the current node selected

sour fulcrum
#

This is a nice idea for an addon...

quasi loom
#

thank you for the reply, I wrote a workaround for the problem:

I create a custom base class for Node that includes an EzInspect(GodotObject toInspect) function. This fuction adds toInspect to a custom dictionary. I also override _GetPropertyList() / etc as part of that workflow. see the examples here for generally how to do it: https://docs.godotengine.org/en/latest/classes/class_object.html#method-descriptions

Here is my C# code that basically does it, but it's integrated with my custom framework so you can't just copy/paste this and have it work. but the algo shown works.