Is there a way to get the bottom panel’s Control and thus figure out its visibility status. I am working on a plugin which hides the bottom panel. But ideally would like to know whether to restore the bottom panel to its original state when the plugin’s job is done.
There is a way to set the visible state the bottom panel using EditorPlugin. hide_bottom_panel ( ) and make_bottom_panel_item_visible ( Control item ).
Your solution works so that gave me an idea. Hardest part was figuring out the node name . I took it a step further, as I don’t trust the internal numbered node names as the numbers can change. What I decided to do instead is to just search for a node name containing
EditorBottomPanel
starting at the base_control(). I guess there is always a chance of dupes so i may refine it further.
It’s a pseudo-recursive walk through the base control until it finds a match and then quits. Pretty fast for my purposes. Thanks again!
var base=EditorInterface.get_base_control()
var waiting := base.get_children()
while not waiting.is_empty():
var node := waiting.pop_back() as Node
if node.name.find("EditorBottomPanel") >= 0:
print(node)
# node.visible=not visible
break
else:
waiting.append_array(node.get_children())