[Bf-blender-cvs] [79638c5c304] blender2.8: UI: backface cull generated icons

Campbell Barton noreply at git.blender.org
Sun Apr 29 16:51:59 CEST 2018


Commit: 79638c5c304a241faeaab4f991fa9c40f5a1a4d7
Author: Campbell Barton
Date:   Sun Apr 29 16:51:15 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB79638c5c304a241faeaab4f991fa9c40f5a1a4d7

UI: backface cull generated icons

Allows for keeping icons 3D without adding extra geometry at export.

===================================================================

M	release/datafiles/blender_icons_geom.py

===================================================================

diff --git a/release/datafiles/blender_icons_geom.py b/release/datafiles/blender_icons_geom.py
index fa7f48f90a2..a0edc2152a8 100644
--- a/release/datafiles/blender_icons_geom.py
+++ b/release/datafiles/blender_icons_geom.py
@@ -87,6 +87,11 @@ def write_mesh_data_lists(me):
     tris_colors = []
 
     for p in me_polys:
+
+        # Backface culling (allows using spheres without tedious manual deleting).
+        if p.normal.z <= 0.0:
+            continue
+
         l_sta = p.loop_start
         l_len = p.loop_total
         loops_poly = me_loops[l_sta:l_sta + l_len]



More information about the Bf-blender-cvs mailing list