From c52466848c85092a010853ca729f1a964a79cc22 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Tue, 13 Nov 2012 15:00:34 +0000 Subject: [PATCH] apply patch from [#33138] X3D export: honour "Auto Smooth" checkbox un-modified, my own change didnt match up with the x3d spec. --- io_scene_x3d/export_x3d.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index 1b9711b5d..5e6afc3af 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: -- GitLab