All right thanks everyone, I'll see what I can from there.
Cheers!
Bernard
On 10/4/07, Nicolas Langlois <nicolasl(at)buzzimage.com> 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
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi