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
Forum topic · General Scripting
By Mrjacks2o · 2017-03-14
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
barigazy · 2017-03-14
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
Mrjacks2o · 2017-03-14
thank you worked like a charm!!!