Skip to content
Snippets Groups Projects
Commit 919ab638 authored by Campbell Barton's avatar Campbell Barton
Browse files

fix [#27896] B258.0 > X3D export > 2 bugs: Lib Groups, Rotation 0 0 0 0

bug #2, zero length axis.
parent f7bf1274
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment