[Bf-blender-cvs] [d67b120f172] blender2.8: UI: disable writing icon size

Campbell Barton noreply at git.blender.org
Tue Apr 24 13:53:10 CEST 2018


Commit: d67b120f172290fc7a1b4cfb5432e03017426f6e
Author: Campbell Barton
Date:   Tue Apr 24 13:49:39 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd67b120f172290fc7a1b4cfb5432e03017426f6e

UI: disable writing icon size

Causes staircasing, just use byte range

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

M	release/datafiles/blender_icons_geom.py

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

diff --git a/release/datafiles/blender_icons_geom.py b/release/datafiles/blender_icons_geom.py
index 9787d18b4f6..ad1ba02fb9f 100644
--- a/release/datafiles/blender_icons_geom.py
+++ b/release/datafiles/blender_icons_geom.py
@@ -141,10 +141,22 @@ def write_mesh_to_py(fh, ob):
     with TriMesh(ob) as me:
         tris_coords, tris_colors = write_mesh_data_lists(me)
 
-    coords_range = (
-        ob.get("size_x") or 255,
-        ob.get("size_y") or 255,
-    )
+    if 0:
+        # make as large as we can, keeping alignment
+        def size_scale_up(size):
+            assert(size != 0)
+            while size * 2 <= 255:
+                size *= 2
+            return size
+
+        coords_range = (
+            size_scale_up(ob.get("size_x")) or 255,
+            size_scale_up(ob.get("size_y")) or 255,
+        )
+    else:
+        # disable for now
+        coords_range = 255, 255
+
     # Pixel size needs to be increased since a pixel needs one extra geom coordinate,
     # if we're writing 32 pixel, align verts to 33.
     coords_range_align = tuple(min(c + 1, 255) for c in coords_range)



More information about the Bf-blender-cvs mailing list