Skip to content

Instantly share code, notes, and snippets.

@kickbase
Last active June 18, 2017 15:04
Show Gist options
  • Save kickbase/91c7482526ab756ed9a23adac077b797 to your computer and use it in GitHub Desktop.
Save kickbase/91c7482526ab756ed9a23adac077b797 to your computer and use it in GitHub Desktop.
[Houdini] [Python] Create transform node what moves object to the floor.
selectedNode = hou.selectedNodes()
if len(selectedNode) is not 0:
for node in selectedNode:
transformNode = node.parent().createNode('xform', 'tf_touch_down')
hou.node(transformNode.path()).setInput(0, hou.node(node.path()))
transformNode.moveToGoodPosition()
transformNode.parm('ty').setExpression(
'-$YMIN', language=hou.exprLanguage.Hscript)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment