#editor: showing two inspectors, or inspecting child node
1 messages · Page 1 of 1 (latest)
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
This is a nice idea for an addon...
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.
Inherited By: AudioServer, CameraServer, ClassDB, DisplayServer, EditorFileSystemDirectory, EditorInterface, EditorPaths, EditorSelection, EditorUndoRedoManager, EditorVCSInterface, Engine, EngineD...
Are you in Godot 3 or 4?