[Sidefx-houdini-list] prim group name

Ken Ouellette ken.ouellette at gmail.com
Thu Oct 2 11:55:28 EDT 2008


old school hscript way..

echo `primgroupmask("/obj/yourObject/yourSOP","yourGroupName*")`�
The above will return the names of all groups matching the "yourGroupName*"
condition

or

echo `primgrouplist("/obj/box_object1/group1")`�
The above will return *all* prim groups for the specified SOP.

If you name the groups with a "_" you can use the rindex command to find
that location and then substr out from that (position+1) to the strlen of
the groupname.

just be sure to loop through the list of groupNames if you have many.

example:
set var =`primgrouplist("/obj/box_object1/group1")`�
echo $var
-->group_new�
echo `substr($var, rindex($var,"_")+1,strlen($var))`
-->new�

Or

you could do it with HOM.. but I'm not up on that as of yet.

-k


On Thu, Oct 2, 2008 at 10:05 AM, Adrian Lee <dryrainstudios at gmail.com>wrote:

> howdo all
>
> is there an expression that returns the name of the group a primative is
> in?  I am trying to add an atruibute to a number of groups before extruding
> so that I can group them again after
>
> or is ther a way of getting the groups number abit like opdigit. ie
> groupfoo_100 would return 100
>
> thanks
>
> Ed
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>


More information about the Sidefx-houdini-list mailing list