[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3959] trunk/py/scripts/addons/ io_scene_x3d/export_x3d.py: apply patch from [#33138] X3D export: honour " Auto Smooth" checkbox
Campbell Barton
ideasman42 at gmail.com
Tue Nov 13 16:00:34 CET 2012
Revision: 3959
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3959
Author: campbellbarton
Date: 2012-11-13 15:00:34 +0000 (Tue, 13 Nov 2012)
Log Message:
-----------
apply patch from [#33138] X3D export: honour "Auto Smooth" checkbox
un-modified, my own change didnt match up with the x3d spec.
Modified Paths:
--------------
trunk/py/scripts/addons/io_scene_x3d/export_x3d.py
Modified: trunk/py/scripts/addons/io_scene_x3d/export_x3d.py
===================================================================
--- trunk/py/scripts/addons/io_scene_x3d/export_x3d.py 2012-11-13 13:10:15 UTC (rev 3958)
+++ trunk/py/scripts/addons/io_scene_x3d/export_x3d.py 2012-11-13 15:00:34 UTC (rev 3959)
@@ -852,8 +852,10 @@
# --- Write IndexedFaceSet Attributes (same as IndexedTriangleSet)
fw('solid="%s"\n' % ('true' if material and material.game_settings.use_backface_culling else 'false'))
- if is_smooth and mesh.use_auto_smooth:
- fw(ident_step + 'creaseAngle="%.4f"\n' % mesh.auto_smooth_angle)
+ if is_smooth:
+ # use Auto-Smooth angle, if enabled. Otherwise make
+ # the mesh perfectly smooth by creaseAngle > pi.
+ fw(ident_step + 'creaseAngle="%.4f"\n' % (mesh.auto_smooth_angle if mesh.use_auto_smooth else 4.0))
if use_normals:
# currently not optional, could be made so:
More information about the Bf-extensions-cvs
mailing list