Jump to content

promoting parameters to subnet node with python


Recommended Posts

In a test scene I have a sphere node inside a geo node inside a subnet node
I want to promote the sphere node parameters to the subnet node
with this code I'm getting an error:

The attempted operation failed.
Invalid indices/name/parm template

import hou

#get pTGroup on node
node = hou.node('obj/subnet1')
ptg = node.parmTemplateGroup()

#create new folder in group
sphereFolder = houFolderParmTemplate('sphr', 'sphere', folder_type=hou.folderType.Simple)


#find inner sphere node
sph = hou.node('obj/subnet1/sphere_object1/sphere1')

#get pTGroup on sphere node
sphG = sph.parmTemplateGroup()

#promote the parameters of sphere node to upper node (subnet1)
sphere_folder = ptg.findFolder("sphere")
for i in sphG.entriesWithoutFolders():
      ptg.appendToFolder(sphere_folder, i)


what am I doing wrong?


Edited by gweiss
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.

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