Python HDA attributes

   36   0   1
User Avatar
41 posts
Joined: July 2013
I am trying to create an HDA with dynamic Python menus. I can access parameters from nodes, but I don't know how to access attributes.

This works and prints out the appropriate value
geo = hou.node('/obj/geo/pythonMenu/box')
test = geo.parm('tx')
print test.eval()

Using an Attribute Wrangler I created a string, from some primitive attributes.
s@prim = detailintrinsic(0,“primitiveattributes”);

prim contains

I want to use prim in a for loop to populate the menu

I need to generate a string like

token = 0
for x in prim:

I tried geo.attribValue("prim'), from a forum post. But, attribValue is not a valid method.

I attached the project, but the main issue is how to interact with attributes with python.

Brad Carvey

pythonMenu.hiplc (72.4 KB)

Brad Carvey
  • Quick Links