I am new to Houdini and am trying to use HOM to get primitive group names. I have two primitive attrs called mesh_name and part_name but am only interested in the mesh_name.
In a python text port i try the commands
>>>geo = hou.node(“/obj/geo1”).displayNode().geometry()
>>>for prim in geo.prims():
>>> print geo.prims
and it prints out:
<bound method Geometry.prims of <hou.Geometry in /obj/geo1/partition1>>
How do i get the primitive Attr Names?
Thanks in advance.
HOM and primative groups
3769 4 1-
- jimmyj90
- Member
- 3 posts
- Joined:
- オフライン
-
- koen
- Member
- 798 posts
- Joined: 4月 2020
- オフライン
-
- jimmyj90
- Member
- 3 posts
- Joined:
- オフライン
-
- jimmyj90
- Member
- 3 posts
- Joined:
- オフライン
-
- koen
- Member
- 798 posts
- Joined: 4月 2020
- オフライン
Hello James,
here is some code, using the attr from the previous example:
geo= hou.pwd().geometry()
prims = geo.prims()
attr = geo.findPrimAttrib(“mesh_name”)
for p in prims:
p.setAttribValue(attr,“mesh”)
This will only work inside a custom python sop, running this from a python shell will result in permission error.
Cheers,
Koen
here is some code, using the attr from the previous example:
geo= hou.pwd().geometry()
prims = geo.prims()
attr = geo.findPrimAttrib(“mesh_name”)
for p in prims:
p.setAttribValue(attr,“mesh”)
This will only work inside a custom python sop, running this from a python shell will result in permission error.
Cheers,
Koen
-
- Quick Links


Thanks Koen.