diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-04-27 16:51:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-04-27 16:51:09 +0400 |
commit | 2883242cdecb86687450a84948b1d9cb88ebf061 (patch) | |
tree | 4a4707a0183d81170b40bd3647c170d6733d4a94 /release/scripts/export_lightwave_motion.py | |
parent | 176a4c8507fa431270b5efa7b36d3dbdc9d3d197 (diff) |
Lightwave mot exporter now does worldspace loc/size/rot
Diffstat (limited to 'release/scripts/export_lightwave_motion.py')
-rw-r--r-- | release/scripts/export_lightwave_motion.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/release/scripts/export_lightwave_motion.py b/release/scripts/export_lightwave_motion.py index 166bc49dc20..888e11ef3ba 100644 --- a/release/scripts/export_lightwave_motion.py +++ b/release/scripts/export_lightwave_motion.py @@ -58,8 +58,8 @@ ObjSelect = B.Object.GetSelected() def FuncionPrincipal (Dir): B.Window.WaitCursor(1) - for O in ObjSelect: - origName= NombreObjeto= O.name + for ob in ObjSelect: + origName= NombreObjeto= ob.name print '----\nExporting Object "%s" motion file...' % origName SC = B.Scene.getCurrent() @@ -102,25 +102,27 @@ def FuncionPrincipal (Dir): while FrameA < (FrameF + 1): B.Set('curframe', FrameA) - + + mat= ob.mat # Worldspace matrix + if NumCanal == 0: - Val = O.LocX + Val = mat.translationPart().x elif NumCanal == 1: - Val = O.LocZ + Val = mat.translationPart().z elif NumCanal == 2: - Val = O.LocY + Val = mat.translationPart().y elif NumCanal == 3: - Val = -O.RotZ + Val = -mat.toEuler().z elif NumCanal == 4: - Val = -O.RotX + Val = -mat.toEuler().x elif NumCanal == 5: - Val = -O.RotY + Val = -mat.toEuler().y elif NumCanal == 6: - Val = O.SizeX + Val = mat.scalePart().x elif NumCanal == 7: - Val = O.SizeZ + Val = mat.scalePart().z elif NumCanal == 8: - Val = O.SizeY + Val = mat.scalePart().y File.write (' Key %f %f 3 0 0 0 0 0 0\n' % (Val, (FrameA/FrameRate))) |