How to pick a group,use pickButton?

I'm use a pickButton to pick a group,but pickButton.obj is picked group's member, how to pick the group?

Comments

Comment viewing options

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

Use the filter: option and

Use the filter: option and supply a filter function that checks for isGroupMember().

That way, only objects that are members of a group can be picked.

Once you have a node, you could check for it's .parent property to get the group head. For safety, you should probably also call isGroupHead() on that one and if that returns false, you should keep traversing the .parent nodes until you have a group head.

Hope this helps

Martin 

Frika's picture

The only way I have found

The only way I have found for now is that you have open the group and pick the group object directly
regards
Frika

Comment viewing options

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