diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-28 09:41:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-28 09:41:22 +0400 |
commit | 919ab638a713be72950c1a016c5e7ce821d82df1 (patch) | |
tree | ceff43afcbd90f745c51407703dd9869bdd9b4ff | |
parent | f7bf12743d54b6278eaedcab5e721687e6ad27dc (diff) |
fix [#27896] B258.0 > X3D export > 2 bugs: Lib Groups, Rotation 0 0 0 0
bug #2, zero length axis.
-rw-r--r-- | io_scene_x3d/export_x3d.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index 7326d9d0..81c29b04 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -240,7 +240,7 @@ def export(file, fw('DEF=%s\n' % view_id) fw(ident_step + 'centerOfRotation="0 0 0"\n') fw(ident_step + 'position="%3.2f %3.2f %3.2f"\n' % loc[:]) - fw(ident_step + 'orientation="%3.2f %3.2f %3.2f %3.2f"\n' % (quat.axis[:] + (quat.angle, ))) + fw(ident_step + 'orientation="%3.2f %3.2f %3.2f %3.2f"\n' % (quat.axis.normalized()[:] + (quat.angle, ))) fw(ident_step + 'fieldOfView="%.3g"\n' % obj.data.angle) fw(ident_step + '/>\n') @@ -283,7 +283,7 @@ def export(file, fw(ident_step + 'translation="%.6g %.6g %.6g"\n' % loc[:]) # fw(ident_step + 'center="%.6g %.6g %.6g"\n' % (0, 0, 0)) fw(ident_step + 'scale="%.6g %.6g %.6g"\n' % sca[:]) - fw(ident_step + 'rotation="%.6g %.6g %.6g %.6g"\n' % (quat.axis[:] + (quat.angle, ))) + fw(ident_step + 'rotation="%.6g %.6g %.6g %.6g"\n' % (quat.axis.normalized()[:] + (quat.angle, ))) fw(ident_step + '>\n') ident += '\t' return ident |