ScriptSpot home

Forum topic · General Scripting

how to find out, is a grouphead opened or not?

By artrender · 2013-05-31

Description

I know how to find out if an object is a grouphead

for j in selection do if (isGroupHead j) then
deselect j

and I know how to open a group: setGroupOpen j true

but how to find out, is j opened or not?

Please help!

Comments (6)
artrender

but I guess, it's enough

just


deselect(for o in selection where isOpenGroupHead o collect o)

artrender

ow, thx barigazy

as always, you're here to save me!

Reply to artrender
Branko Živković

I think that is more eficient to collect all nodes and then use deselect, because
functions like select, hide, freeze, deselect etc. are mapped functions. So
your code need to look like this

deselect (for o in selection where isGroupHead o and isOpenGroupHead collect o)

Branko Živković

:)

isOpenGroupHead node