Re: Urgent help needed in scripting

2014-01-16 Thread Thomas Volkmann
Just guessing, but maybe you have to change the rotationorder aswell.
For the AfterFX exporter I did way back, I created a helperObject (null) that I
set to the AFX rotationorder, match the object transform, and the export the
values from the helper:
This is the python snippet:

helper.kinematics.local.parameters('rotorder').Value = 5
helper.kinematics.Global.transform = obj.kinematics.Global.transform
rotX = helper.kinematics.local.rotx.Value
rotY = helper.kinematics.local.roty.Value
rotZ = helper.kinematics.local.rotz.Value

hope that helps somehow!

/Thomas



> Szabolcs Matefy  hat am 16. Januar 2014 um 10:41
> geschrieben:
> 
> 
>  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
> 



Re: Urgent help needed in scripting

2014-01-16 Thread Peter Agg
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  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
>


Urgent help needed in scripting

2014-01-16 Thread Szabolcs Matefy
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