Scripting a toggle button for the Scene Explorer?


#1

Hey ! I’m basically trying to create a button to hide/unhide the default Scene Explorer, but I can’t figure it out. I’m really not a code guy, so I basically try things by copying and pasting lines from forums.

I’ve managed to do this :

statusPanel.visible = not statusPanel.visible
trackbar.visible = not trackbar.visible
timeslider.setVisible (not timeslider.isVisible())

This, when turned into a button, hides/unhides all the UI at the bottom of the default workspace, but similar syntax doesn’t work for the scene explorer.

Anyone who actually knows what they’re doing care to help ? That’d be awesome :smiley:
I’m using max 2023.