Prim Attribute to Groups with VEX ?

   5325   2   0
User Avatar
Member
1112 posts
Joined: Aug. 2008
Offline
Hello, when I import a .obj from Modo I get the “shop_materialpath” as an attribute, so I wanted to turn them into group's with a wrangle node. And wrote what you can see on the attached image. Now the gettattrib and re_replace works as you can see in the Houdini Console. But when I use “currAttrib” in the setprimgroup no groups are created, and there is also no error reported by the wrangle node.

If I uncomment currAttrib = “test”; it does work so..is there someway to get this wokring or do I need a completly different approach to convert the shop_materialpath attribute to groups ?
Edited by MagnusL3D - June 19, 2016 10:15:52

Attachments:
Houdini_Group_from_Attribute.jpg (268.6 KB)

/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
392 posts
Joined: Nov. 2008
Offline
Isn't the problem with the group name starting with number?

Try to replace like this:
"/shop/", "group_"
User Avatar
Member
1112 posts
Joined: Aug. 2008
Offline
pezetko
Isn't the problem with the group name starting with number?

Try to replace like this:
"/shop/", "group_"

Tried that and it worked. however seems like it can be anything as long as it is not a number it starts with, so it doesnt have to be “group_”.

Thanks man, feels a bit stupied that I didnt try that hehe
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
  • Quick Links