[Closed] Select or hide all groups?
Hey everyone, wondering if there is a very quick way to hide all Group objects in the scene. Basically I have a complex model with lots of groups, all open, and it makes the viewport very cluttered. I need to work with the groups open, but I would like to hide them from the viewport.
I can open the Select From Scene window, filter by groups, select all and hide, but I would like to get this into a hotkey if there is a way.
Thanks a ton for any replies!
[B]
macroScript GroupVisibilityToggle category:“Spacefrog Tools”
(
for gh in $objects where ( isgrouphead gh OR isgroupmember gh ) do gh.isNodeHidden = NOT gh.isNodeHidden
)
[/B]
That toggles groups and group members visiblity.
To only hide the opened group’s head ( those redish boxes …), you can use the following code
[B]
macroScript OpenGroupHeadVisibilityToggle category:“Spacefrog Tools”
(
for gh in $objects where isopengrouphead gh do gh.isNodeHidden = NOT gh.isNodeHidden
)
[/B]
Copy/Paste into the MXS editor and press Ctrl-E ( evaluate)
Now you can link your favourite shortcut/menu/button to the command.
You’ll find the tool in the “Spacefrog Tools” category
That’s amazing, thanks for taking the time to write it! Makes sense to me, except what does the $objects do? I know $ is the current selection, so if you have nothing selected, is that just a way of saying “all objects in the scene?”
gh.isNodeHidden = NOT gh.isNodeHidden
this is visibility toggle.
and it’s much better for performance to collect what you want to select first and select them all at once