Last active
June 18, 2017 15:04
-
-
Save kickbase/91c7482526ab756ed9a23adac077b797 to your computer and use it in GitHub Desktop.
[Houdini] [Python] Create transform node what moves object to the floor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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