group based on primitiv attributes

   2534   3   1
User Avatar
Member
4 posts
Joined: July 2012
Offline
Hi,

i have a node with some primitives and some primitive attributes named corner_1 to corner_N. the amount of corners is variable and depends on whether the endpoints overlap or not.

now i want that the primitiv is attached to a group called corner_X if the value in the corresponding attribute is 1

is that somehow possible?

greetings

Attachments:
hd_primattribs.png (379.7 KB)

User Avatar
Member
512 posts
Joined: July 2009
Offline
Hi,

Why don't you do the grouping in that python SOP that is plugged
into the group node? If you're looking for a node based approach,
put the group SOP into a foreach SOP, loop N times over your primitives
and stamp the loop iteration onto the group name parameter, use the
stamp() expression in the group's expression field as well!

Best,

Manu
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
4 posts
Joined: July 2012
Offline
thank you, that worked fine

i thought i've read somewhere that it is not possible to create groups from within python code…
User Avatar
Member
512 posts
Joined: July 2009
Offline
that was some previous version of houdini where grouping wasn't possible, with Houdini 12 you can definitely do it.

http://www.sidefx.com/docs/houdini12.0/hom/hou/PrimGroup [sidefx.com]
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
  • Quick Links