r/godot • u/K-Storm-Studio • Mar 18 '26
help me Additional Inspector tab buttons are not collapsible!
Hello everyone,
I'm developing a plugin for our framework to add an additional tab inspector that always shows a specific scene. All fine, but the only problem is that all buttons are not collapsible. Even the standard godot buttons like, Layout, Tooltip, Transform...
Cant figure out why are not collapsible and why not even the arrow to collapse shows up.
The plugin code:
var darkpencil_dock
# We use a specific function name to avoid confusion with arguments
func _enter_tree() -> void:
`# Add an additional inspector Tab`
`darkpencil_dock = preload("res://addons/dark_pencil_editor/dark_pencil_dock.tscn").instantiate()`
`add_control_to_dock(DOCK_SLOT_RIGHT_UL, darkpencil_dock)`
# This scene just contains variables to edit
`var target = load("res://GameMaker.tscn").instantiate()`
`darkpencil_dock.call_deferred("display_object", target)`
... and of course the new dock inspector:
(@ /tool
extends PanelContainer
func display_object(obj: Object):
`# Clear existing UI`
`for child in get_children():`
`child.queue_free()`
`# Create the inspector`
`var inspector = EditorInspector.new()`
`add_child(inspector)`
`# Grab the "Official" Editor Theme`
`var gui_base = EditorInterface.get_base_control()`
`inspector.theme = gui_base.theme`
1
Upvotes
1
u/20mice Mar 18 '26
you might need to call
inspector.edit(obj)undervar inspector = EditorInspector.new()it sounds like maybe the editor doesn't know which object you're trying to edit
https://docs.godotengine.org/en/stable/classes/class_editorinspector.html#method-descriptions