ScriptSpot

Forum topic · General Scripting

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

By artrender.info · 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)

but I guess, it's enough

artrender.info · 2013-05-31

just


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

barigazy · 2013-05-31

Yes if you not want to check if is group open

ow, thx barigazy

artrender.info · 2013-05-31

as always, you're here to save me!

barigazy · 2013-05-31

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)

:)

barigazy · 2013-05-31

isOpenGroupHead node

ei.

barigazy · 2013-05-31


for j in selection where isGroupHead j and isOpenGroupHead j do deselect j