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

apply patch from [#33138] X3D export: honour "Auto Smooth" checkbox

un-modified, my own change didnt match up with the x3d spec.
parent 089b22f4
No related branches found
No related tags found
No related merge requests found
...@@ -852,8 +852,10 @@ def export(file, ...@@ -852,8 +852,10 @@ def export(file,
# --- Write IndexedFaceSet Attributes (same as IndexedTriangleSet) # --- Write IndexedFaceSet Attributes (same as IndexedTriangleSet)
fw('solid="%s"\n' % ('true' if material and material.game_settings.use_backface_culling else 'false')) fw('solid="%s"\n' % ('true' if material and material.game_settings.use_backface_culling else 'false'))
if is_smooth and mesh.use_auto_smooth: if is_smooth:
fw(ident_step + 'creaseAngle="%.4f"\n' % mesh.auto_smooth_angle) # 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: if use_normals:
# currently not optional, could be made so: # currently not optional, could be made so:
......
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