primgrouplist
eharetea

Return a list of a group names containing primitives in a given SOP.

PRIMGROUPLIST lists groups.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 03:09 PM

Example usage:
echo `primgrouplist("copy1")`


a good way to count your groups:
echo `argc(primgrouplist("copy1"))`


Here is a cool script (makes object merge foreach primgroup):
foreach x(`primgrouplist("/obj/model")`)

 opadd object_merge $x

 opparm $x objpath1 /obj/model/file1

 opparm $x group1 $x

end


then merge them when your done:
foreach z (`run(ls)`)

 set y = `$y+1`

 if $z==merge1

 continue

endif

opwire $z -$y merge1

end