List all GROUPS in a scene?

Does anybody know of a command that will return all the groups in a scene?

Thanks!
-bN

Hello there,

if for GROUP you intent a transfrom with no shape you can do something like:

global proc string[] getGroup ()
{
string $getTrs[] = ls -type "transform";
int $i = 0;
string $getGroup[];
for ($i = 0; size $getTrs > $i; $i++) {
string $getShape[] = listRelatives -s $getTrs[$i];
if (! size $getShape ) {
$getGroup[size $getGroup] = $getTrs[$i] ;
}
}
return $getGroup;
}

getGroup;

This will truen a string array with all the transofrmation nodes that do not have a shape.

Hope this is what you were looking for.

Later,

-=a

Yes and groups created by group command would just be transforms with no shapes under them (this is a bit loose sice you could in fact use a shape node as a group too), so theese could be classified as groups...

but the general term isnt realy defined in maya on the node levell. so you could querry for all transforms and check to se if they had a shape as their immidiate child (empty with oly other trensforms as children), they wouldnt be a a group else they would.

But on thhe otherhand i tend to use transforms with multiple shape nodes on them so i would classify theese as shape groups too...

it depends.