Houdini Python Module

#disconnect the parent
import hou
objs=hou.node('/obj')
objects=objs.children()
print(objects)
for object in objects:
    if(len(object.inputs())==1):
        object.setFirstInput(None)
    else:
        print(object.name(),' no parent')
#how can i get the selectNode ...
import toolutils
def disconnectinput(obj_node):
    num=len(obj_node.inputConnections())
    for x in range(0,num,1):
        f.setInput(0,None)
getview=toolutils.sceneViewer()
getobj=getview.selectGeometry(prompt='select object',use_existing_selection=True)
disconectinput(getobj)

 
 
  
  
  
  

你可能感兴趣的:(Houdini Python Module)