Extract PreTransforms Python

   2910   2   0
User Avatar
Member
169 posts
Joined: April 2014
Offline
I want to extract the Pretransforms for a null, but do it in Python.

I've looked at http://www.sidefx.com/docs/houdini13.0/hom/hou/ObjNode#setPreTransform [sidefx.com] for setPreTransform but I can't make it work. Can somebody please post an example or maybe link to where I can see it.

Essentially what I'd like to do is zero it out. But while the parameters are easy via myNode.parm(“tx”).set(1) … I cannot find a way to do this for the preTransforms.

I tried ikHandle.parm('pre_xform').set(4) but nothing happens.

Thank You!
Winter is coming!
User Avatar
Member
8579 posts
Joined: July 2007
Offline
to zero out pre-transforms on /obj/null1:
node = hou.node(“/obj/null1”)
node.setPreTransform( hou.hmath.identityTransform() )

that will of course move your object as the pre-transforms will simply be gone/reset

if you want to move pre-transforms to your main transform parms the same way as Extract Pre-Transform does, then you should do this:
node = hou.node(“/obj/null1”)
node.movePreTransformIntoParmTransform()
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
169 posts
Joined: April 2014
Offline
tamte
to zero out pre-transforms on /obj/null1:
node = hou.node(“/obj/null1”)
node.setPreTransform( hou.hmath.identityTransform() )

that will of course move your object as the pre-transforms will simply be gone/reset

if you want to move pre-transforms to your main transform parms the same way as Extract Pre-Transform does, then you should do this:
node = hou.node(“/obj/null1”)
node.movePreTransformIntoParmTransform()

That works !!!

Excellent - thank you so much for the help
Winter is coming!
  • Quick Links