vinshm Posted April 18, 2018 Share Posted April 18, 2018 couldn`t find a way to add "Something" Tag{} in the Parameter Interface by Python,Can Somebody help Please? Quote Link to comment Share on other sites More sharing options...
vinshm Posted April 20, 2018 Author Share Posted April 20, 2018 anyone knows?still no idea Quote Link to comment Share on other sites More sharing options...
graham Posted April 21, 2018 Share Posted April 21, 2018 You can do this by modifying the hou.ParmTemplate for a parameter. Consider a Float parm named "parm" that already has a tag of foo:bar set from the interface: >>> parm = hou.parm('/obj/geo1/null1/parm') # Get the hou.ParmTemplate for your parameter >>> pt = parm.parmTemplate() >>> pt.tags() {'foo': 'bar'} >>> tags = pt.tags() >>> tags["new"] = "value" # Update the tags >>> pt.setTags(tags) >>> pt.tags() {'new': 'value', 'foo': 'bar'} # Replace the existing tuple/template with the modified one. >>> hou.node('/obj/geo1/null1').replaceSpareParmTuple(pt.name(), pt) <hou.ParmTuple parm in /obj/geo1/null1> >>> p.parmTemplate().tags() {'new': 'value', 'foo': 'bar'} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.