Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Zaal <gregzzmail@gmail.com>2015-05-02 19:01:56 +0300
committerGreg Zaal <gregzzmail@gmail.com>2015-05-02 19:03:49 +0300
commitb5afec7389dde946c18571675775b0cb8bf22124 (patch)
tree9e1b9a5ebb929066a12dbc092cc07fecf9db00b2
parent7faa91ddc07db7a548b54a7ed7856d1990193ac8 (diff)
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
-rw-r--r--render_auto_tile_size.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/render_auto_tile_size.py b/render_auto_tile_size.py
index a773281d..00f848ef 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