transform packed geo to origin and back

   1184   2   1
User Avatar
Member
69 posts
Joined: May 2017
Offline
Hey guys. This code works perfectly for transform the packed geo to origin(0,0,0). I'm having difficulty transforming it back. What would be the code? Thanks.

matrix3 newRot = ident();
matrix myMatrix = primintrinsic(0, "packedfulltransform", 0);
setprimintrinsic(0, "transform", @ptnum, newRot, "set");
v@P *= invert(myMatrix);
User Avatar
Member
359 posts
Joined: April 2017
Offline
assuming you still have the original P position and transform from before:

setprimintrinsic(0, "transform", @ptnum, origPackedFullTransform);
@P = origP;

you can't write directly to packedfulltransform as far as i know, but writing to the transform intrinsic should get you what you want in almost any case.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
69 posts
Joined: May 2017
Offline
I'll try it.

Thx.
  • Quick Links