ok, I see, I'm tired and not able to get the things right anymore...
difference != slerp
blah
vladi
Nicolas Langlois wrote:
Bernard,
Maybe something like this:
# PYTHON CODE
import win32com.client
from win32com.client import constants
from win32com.client import Dispatch
XSIMath = Dispatch('XSI.Math')
# Get the items Transforms
oItemATransform = oItemsA.Kinematics.Global.Transform
oItemBTransform = oItemsB.Kinematics.Global.Transform
oItemCTransform = oItemsA.Kinematics.Global.Transform
oRotA = XSIMath.CreateRotation()
oRotB = XSIMath.CreateRotation()
oRotC = XSIMath.CreateRotation()
oItemATransform.GetRotation(oRotA)
oItemATransform.GetRotation(oRotB)
#Create Quaternions.
oRotA.GetQuaternion(q1)
oRotB.Quaternion(q2)
#q1 = q1 - q2
q1.SubInPlace(q2)
oRotC.SetFromQuaternion(q1)
oItemCTransform.SetRotation(oRotC)
oItemsC.Kinematics.Global.Transform = oItemCTransform
# END PYTHON CODE
Nicolas Langlois
Senior/Lead Rigger/TD
Buzz Image
Bernard Lebel wrote:
Hello,
I'd need some guidance here. Say I have 3 objects. I want the third
object to get the rotational difference between the first two.
In a simplified example, the first object has rotx 25.0, the second
has rotx 15.0, so I'd want the third object to get rotx of 10.0.
I'm not sure at all where to go from there, using the XSI math
objects. Do I have to perform a subtraction for every axis of the
rotation?
Thanks
Bernard
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
--
Vladimir Jankijevic
3D / Animation
frame eleven ag
Schiffbaustrasse 10
8005 Zurich
tel +41-1-444 34 44
fax +41-1-444 34 45
vladimir.jankijevic(at)frame-eleven.com
www.frame-eleven.com
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi