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>2012-11-12 06:27:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-12 06:27:26 +0400
commit089b22f449bd43c7a2f8e328815a2e575ce20ef1 (patch)
tree616cc7d7d5e065004974b76b16c683280cbdb506 /io_scene_x3d
parent24cebd7bedd20af91427426f0d2e52606e732014 (diff)
alternate fix for patch [#30572] X3D exporter outputs invalid Viewpoint.orientation = zero
by Michalis Kamburelis (kambi) Normalize the axis before writing to avoid small values writing as a zero'd axis.
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/export_x3d.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index 5a8d6a24..1b9711b5 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -369,7 +369,7 @@ def export(file,
loc, rot, scale = matrix.decompose()
rot = rot.to_axis_angle()
- rot = rot[0][:] + (rot[1], )
+ rot = rot[0].normalized()[:] + (rot[1], )
ident_step = ident + (' ' * (-len(ident) + \
fw('%s<Viewpoint ' % ident)))