Jump to content

How to set Tags parameter using python

Recommended Posts


How to use python to add a tag like this.

I try to use asCode() to extract the code but it's doesn't work, it can rebuild all the parameters but except this one。


Edited by coresign

Share this post

Link to post
Share on other sites

i have the same question, i found a way but it still not showing in the tags parameters and exact texture in viewport

here is the screenshot, you can see i checked everything and it works ok, no errors, but still not showing anything 

upd: ive been told this is because of parmTemplate i need to setup it and put it back to parameter, somehow, trying to find how


Share this post

Link to post
Share on other sites

So in this case you actually just want to set the parameter:

hou.parm("/path/to/parm").set({"ogl_text": "1"})

This is because you're just trying to modify an actual parameter, not the definition.

You would use the hou.ParmTemplate.setTags() method if you were trying to set/update the tags of a parameter definition but since the Parameter node isn't an actual parameter you just need to set the values.  Your quick update is correct in that if you were doing it this way, you'd have to take your modified parameter template and assign it back to the definition or node for it to take hold.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now