Selection.count problems

Hi i am trying to get the selection.count of a grouped object i have 3 objects in 1 group
it returns a value of 4 but i need it to just count 1 since its 1 group and not the objects in the group.

thanks

Comments

Comment viewing options

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

...

in case where you need to find group count you can try this

(for i in selection where isGroupHead i collect i).count

The other case will be when you have groupe inside group ei. group as other group member. If you don't want to include this group in the count use next line

(for i in selection where isGroupHead i and not isGroupmember i collect i).count

barigazy

Mrjacks2o's picture

thank you

thank you worked like a charm!!!

Comment viewing options

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