diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-12 06:27:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-12 06:27:26 +0400 |
commit | 089b22f449bd43c7a2f8e328815a2e575ce20ef1 (patch) | |
tree | 616cc7d7d5e065004974b76b16c683280cbdb506 /io_scene_x3d/export_x3d.py | |
parent | 24cebd7bedd20af91427426f0d2e52606e732014 (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/export_x3d.py')
-rw-r--r-- | io_scene_x3d/export_x3d.py | 2 |
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))) |