Jump to content

Attribute pull-down list in OTL


bandini

Recommended Posts

Hey there,

 

I am wondering how to get a pull-down list of available point attributes in a text field of an OTL. Just like when you have an attributetransfer sop, there is a little arrow there with a list of available attributes from the incoming geometry.

 

Thanks!
Adam

Link to comment
Share on other sites

Choose a string parameter and go to the menu tab in the parameter description.

Check use menu and in the drop down select Replace(Field + single selection...)

 

Now you need to write a python snippet in the menu script field.

result = []
geo = hou.pwd().geometry()

for attr in geo.pointAttribs():
        result.append(attr.name())
        result.append(attr.name())
return result

Dont forgett to set the Menu script Language to python...

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...