[Bf-extensions-cvs] [b5afec7] master: Auto Tile Size: Fix minor bug

Greg Zaal noreply at git.blender.org
Sat May 2 18:06:05 CEST 2015


Commit: b5afec7389dde946c18571675775b0cb8bf22124
Author: Greg Zaal
Date:   Sat May 2 18:01:56 2015 +0200
Branches: master
https://developer.blender.org/rBAb5afec7389dde946c18571675775b0cb8bf22124

Auto Tile Size: Fix minor bug

Tile size would be recalculated constantly (every scene update) when the calculated size was less than 8 pixels (blender's own hard limit)
diff --git a/render_auto_tile_size.py b/render_auto_tile_size.py
index a773281..00f848e 100644
--- a/render_auto_tile_size.py
+++ b/render_auto_tile_size.py
@@ -20,7 +20,7 @@ bl_info = {
     "name": "Auto Tile Size",
     "description": "Estimate and set the tile size that will render the fastest",
     "author": "Greg Zaal",
-    "version": (3, 0),
+    "version": (3, 1),
     "blender": (2, 74, 0),
     "location": "Render Settings > Performance",
     "warning": "",
@@ -300,6 +300,12 @@ def do_set_tile_size(context):
     else:
         settings.threads_error = False

+    # Make sure tile sizes are within the internal limit
+    tile_x = max(8, tile_x)
+    tile_y = max(8, tile_y)
+    tile_x = min(65536, tile_x)
+    tile_y = min(65536, tile_y)
+
     render.tile_x = tile_x
     render.tile_y = tile_y

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

M	render_auto_tile_size.py

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

diff --git a/render_auto_tile_size.py b/render_auto_tile_size.py
index a773281..00f848e 100644
--- a/render_auto_tile_size.py
+++ b/render_auto_tile_size.py
@@ -20,7 +20,7 @@ bl_info = {
     "name": "Auto Tile Size",
     "description": "Estimate and set the tile size that will render the fastest",
     "author": "Greg Zaal",
-    "version": (3, 0),
+    "version": (3, 1),
     "blender": (2, 74, 0),
     "location": "Render Settings > Performance",
     "warning": "",
@@ -300,6 +300,12 @@ def do_set_tile_size(context):
     else:
         settings.threads_error = False
 
+    # Make sure tile sizes are within the internal limit
+    tile_x = max(8, tile_x)
+    tile_y = max(8, tile_y)
+    tile_x = min(65536, tile_x)
+    tile_y = min(65536, tile_y)
+
     render.tile_x = tile_x
     render.tile_y = tile_y



More information about the Bf-extensions-cvs mailing list