Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-07-28 09:41:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-28 09:41:22 +0400
commit919ab638a713be72950c1a016c5e7ce821d82df1 (patch)
treeceff43afcbd90f745c51407703dd9869bdd9b4ff /io_scene_x3d
parentf7bf12743d54b6278eaedcab5e721687e6ad27dc (diff)
fix [#27896] B258.0 > X3D export > 2 bugs: Lib Groups, Rotation 0 0 0 0
bug #2, zero length axis.
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/export_x3d.py4
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