Jump to content
myra

edit parameter interface question

Recommended Posts

i have a geo node and a object merge in side it

on the geo node

using edit parameter interface > from node tab > i can expose the object path attribute on the geo node

but what would be a way to add object path of the object merge on the geo node using python

Share this post


Link to post
Share on other sites

Try:

node = hou.node('/obj/sphere')

# Copy parameter from object merge.
path_parm = node.parm('object_merge1/objpath1')
ptg = node.parmTemplateGroup()
ptg.append(path_parm.parmTemplate())
node.setParmTemplateGroup(ptg)

# Copy value to promoted parameter.
promoted_parm = node.parm('objpath1')
promoted_parm.set(path_parm.eval())

# Set parameter reference.
path_parm.set(promoted_parm)

 

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

×