Jump to content

edit parameter interface question


myra

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

Link to comment
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)

 

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...