From 089b22f449bd43c7a2f8e328815a2e575ce20ef1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Nov 2012 02:27:26 +0000 Subject: 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. --- io_scene_x3d/export_x3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io_scene_x3d/export_x3d.py') 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