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

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
artrender.info's picture

but I guess, it's enough

just

deselect(for o in selection where isOpenGroupHead o collect o)
barigazy's picture

...

Yes if you not want to check if is group open

barigazy

artrender.info's picture

ow, thx barigazy

as always, you're here to save me!

barigazy's picture

...

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

barigazy's picture

:)

isOpenGroupHead node

barigazy

barigazy's picture

ei.

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

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.