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

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