[Bf-extensions-cvs] [91733dff] master: X3D exporter: export "backface culling" as X3D solid field
Michalis Kamburelis
noreply at git.blender.org
Fri Mar 27 00:42:52 CET 2020
Commit: 91733dfff1bec689745209cc33fe458b65d9f19a
Author: Michalis Kamburelis
Date: Fri Mar 27 00:39:01 2020 +0100
Branches: master
https://developer.blender.org/rBA91733dfff1bec689745209cc33fe458b65d9f19a
X3D exporter: export "backface culling" as X3D solid field
See X3D specification:
https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#CommonGeometryFields
Differential Revision: https://developer.blender.org/D7186
===================================================================
M io_scene_x3d/export_x3d.py
===================================================================
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index 52b43931..a9d694d6 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -699,7 +699,7 @@ def export(file,
fw('%s<IndexedTriangleSet ' % ident)))
# --- Write IndexedTriangleSet Attributes (same as IndexedFaceSet)
- fw('solid="false"\n') # not available anymore: bool_as_str(material and material.game_settings.use_backface_culling))
+ fw('solid="%s"\n' % bool_as_str(material and material.use_backface_culling))
if use_normals or is_force_normals:
fw(ident_step + 'normalPerVertex="true"\n')
@@ -834,7 +834,7 @@ def export(file,
fw('%s<IndexedFaceSet ' % ident)))
# --- Write IndexedFaceSet Attributes (same as IndexedTriangleSet)
- fw('solid="false"\n') # not available anymore: bool_as_str(material and material.game_settings.use_backface_culling)
+ fw('solid="%s"\n' % bool_as_str(material and material.use_backface_culling))
if is_smooth:
# use Auto-Smooth angle, if enabled. Otherwise make
# the mesh perfectly smooth by creaseAngle > pi.
More information about the Bf-extensions-cvs
mailing list