Created
March 1, 2020 05:48
-
-
Save tanitta/e1a1436c2a071c5d57dbb3d8b3effdde to your computer and use it in GitHub Desktop.
houdiniでoperatorのtransform(positionとrotation)を他のoperatorのtransformに転送するtool
This file contains hidden or 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
| import hou | |
| import sys | |
| def transfer_transform(): | |
| source = hou.selectedNodes()[0] | |
| if source is None: return | |
| target = hou.selectedNodes()[1] | |
| if target is None: return | |
| tx = source.parm("tx").eval() | |
| ty = source.parm("ty").eval() | |
| tz = source.parm("tz").eval() | |
| rx = source.parm("rx").eval() | |
| ry = source.parm("ry").eval() | |
| rz = source.parm("rz").eval() | |
| target.parm("tx").set(tx) | |
| target.parm("ty").set(ty) | |
| target.parm("tz").set(tz) | |
| target.parm("rx").set(rx) | |
| target.parm("ry").set(ry) | |
| target.parm("rz").set(rz) | |
| source.parm("tx").set(0) | |
| source.parm("ty").set(0) | |
| source.parm("tz").set(0) | |
| source.parm("rx").set(0) | |
| source.parm("ry").set(0) | |
| source.parm("rz").set(0) | |
| transfer_transform() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment