Jump to content

How to move parameter to root Python !!


Morrorz

Recommended Posts

import hou
#CreateNode
root = "/obj"
node = hou.node(root).createNode("geo" , "test")
#ParmGRP
parm_group = node.parmTemplateGroup()
parm = hou.IntParmTemplate("testParm", "TestParameter"  , 1)
#ParmAppend
parm_group.append(parm)
node.setParmTemplateGroup(parm_group)

#Move To Tranform Folder()
parm_group.remove("testParm")
parm_group.appendToFolder(parm_group.findIndicesForFolder("Transform"),node.parm("testParm").parmTemplate())
node.setParmTemplateGroup(parm_group)

#################### MOVE TO ROOT #######################

#################### ERROR #######################

parm_group = parm_group
parm_group.remove("testParm")
#parm_group.appendToFolder(parm_group.findIndicesForFolder("Misc"),node.parm("testParm").parmTemplate())
parm_group.appendToFolder(parm_group.findIndicesForFolder("root"),node.parm("testParm").parmTemplate())
node.setParmTemplateGroup(parm_group)

01.png

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