I'm not 100% sure what you need exactly, but this will make a Transform
object that's been rotated 90 degrees around the world centre in X.
______________________________________________
m_data = [1.0, 0.0, -0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, -1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0]
matrix = XSIMath.CreateMatrix4()
matrix.Set(*m_data)
trans = XSIMath.CreateTransform()
trans.SetMatrix4(matrix)
obj = Application.Selection(0) # <------------------------------replace as
you see fit
obj_transform = obj.Kinematics.Global.Transform
obj_transform.MulInPlace(trans)
print obj_transform.RotX, obj_transform.RotY, obj_transform.RotZ
______________________________________________
On 16 January 2014 09:41, Szabolcs Matefy <[email protected]> wrote:
> Hey folks,
>
>
>
> I have a task. I need to export some geometries from XSI, and create an
> XML file that contains the local translate and rotation. That’s fine. But
> it turned out, that the application reading this data accepts
> transformation in Z-up system (a la Max, goddamn). I swapped the Y and Z
> for position and seemed to work, but for rotation it’s not working.
>
>
>
> My export script is vbscript, but I have little clue. What I read so far
> is that I might have to rotate the transformation matrix around X axis by
> 90 degrees. Fairly well, but HOW THE HECK???
>
>
>
> I’m open to learn math, anytime, but now it’s deadline…
>
>
>
>
>
> Cheers, and appreciate for any help
>
>
>
>
>
>
>
> Szabolcs
> ___
> This message contains confidential information and is intended only for
> the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system. E-mail transmission cannot be
> guaranteed to be secure or error-free as information could be intercepted,
> corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
> The sender therefore does not accept liability for any errors or omissions
> in the contents of this message, which arise as a result of e-mail
> transmission. If verification is required please request a hard-copy
> version. Crytek GmbH - http://www.crytek.com - Grüneburgweg 16-18, 60322
> Frankfurt - HRB77322 Amtsgericht Frankfurt a. Main- UST IdentNr.:
> DE20432461 - Geschaeftsfuehrer: Avni Yerli, Cevat Yerli, Faruk Yerli
>