diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-13 19:00:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-13 19:00:34 +0400 |
commit | c52466848c85092a010853ca729f1a964a79cc22 (patch) | |
tree | fd9c854a0016cf95c156757a5520f2710dabcc04 /io_scene_x3d/export_x3d.py | |
parent | 089b22f449bd43c7a2f8e328815a2e575ce20ef1 (diff) |
apply patch from [#33138] X3D export: honour "Auto Smooth" checkbox
un-modified, my own change didnt match up with the x3d spec.
Diffstat (limited to 'io_scene_x3d/export_x3d.py')
-rw-r--r-- | io_scene_x3d/export_x3d.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index 1b9711b5..5e6afc3a 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -852,8 +852,10 @@ def export(file, # --- 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: |