tyFlow Forum
Slave Rotation by Script - Printable Version

+- tyFlow Forum (http://forum.tyflow.com)
+-- Forum: tyFlow Discussion (http://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (http://forum.tyflow.com/forum-2.html)
+--- Thread: Slave Rotation by Script (/thread-1980.html)

Slave Rotation by Script - usc001 - 10-01-2020

im trying to do a simple Rotation Transfer using script operator.
I have a Dummy in the Scene with animated Rotation and id like to Transfer the Rotation to my Particle. 
I see in the Documentation that SetRot only work with Quaternion Values. 
Is there an easy way to translate the quaternion to an euler angle (i think thats what its called? 0-360 degree i mean).

So im basically looking for Resources to understand how this translation works. 
A simple script example on how to transfer a Dummy Rotation to a Particle would be very helpful!

Thanks in Advance!

RE: Slave Rotation by Script - tyFlow - 10-05-2020

I'm not exactly sure what you're trying to accomplish, but why not simply copy the full object transform to the particle and then revert the position afterwards?

Something like:

var origPos = tf.GetPos(sInx);
tf.SetTM(sInx, obj001.GetTM());
tf.SetPos(sInx, origPos);