[Sidefx-houdini-list] Using hom to find if a parameter has been promoted

Edward Lam edward at sidefx.com
Wed Jan 25 09:17:57 EST 2017


On 25/01/2017 6:21 AM, Sandy Sutherland wrote:
> I need to find if a parm has been promoted so as not to set it.

Here's an illustrated example from a Python Shell:

 >>> p1 = hou.parm('/obj/torus_object1/tx')
 >>> p1.expression()
'ch("../box1/tx")'
 >>> p2 = hou.parm('/obj/torus_object1/ty')
 >>> try: p2.expression()
... except: print "no expr"
...
no expr
 >>> print "has ref:", p1.getReferencedParm() != p1
has ref: True
 >>> print "has ref:", p2.getReferencedParm() != p2
has ref: False



Cheers,
-Edward



More information about the Sidefx-houdini-list mailing list