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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-04-19 13:54:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-04-19 13:56:33 +0300
commit9b48f2b27c0f64c7f8cc452ad3820f705c15495d (patch)
treef3f3ceb6870c3ef1da36c28199499849c0dcd0f2 /intern/cycles/blender
parent376c8dd95ee2412d91292fe04ee3227d955a6e62 (diff)
Cycles: Improvements and fixes for the resumable render
- Fix wrong current sample reported in the log - Also includes fix for progressive refine log - Explicitly print to the stdout that resumable render is enabled - Print error message and abort when passing wrong values for the resumable render. Never waste someone's compute power for wrong render! Fixes T48185: Cycles resumable num chunks breaks sample counter
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r--intern/cycles/blender/blender_python.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index 989ba80c001..ceb9cbf242e 100644
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@ -644,7 +644,20 @@ static PyObject *set_resumable_chunks_func(PyObject * /*self*/, PyObject *args)
if(!PyArg_ParseTuple(args, "ii",
&num_resumable_chunks,
&current_resumable_chunk)) {
- return NULL;
+ Py_RETURN_NONE;
+ }
+
+ if(num_resumable_chunks <= 0) {
+ fprintf(stderr, "Cycles: Bad value for number of resumable chunks.\n");
+ abort();
+ Py_RETURN_NONE;
+ }
+ if(current_resumable_chunk < 1 ||
+ current_resumable_chunk > num_resumable_chunks)
+ {
+ fprintf(stderr, "Cycles: Bad value for current resumable chunk number.\n");
+ abort();
+ Py_RETURN_NONE;
}
VLOG(1) << "Initialized resumable render: "
@@ -653,6 +666,10 @@ static PyObject *set_resumable_chunks_func(PyObject * /*self*/, PyObject *args)
BlenderSession::num_resumable_chunks = num_resumable_chunks;
BlenderSession::current_resumable_chunk = current_resumable_chunk;
+ printf("Cycles: Will render chunk %d of %d\n",
+ current_resumable_chunk,
+ num_resumable_chunks);
+
Py_RETURN_NONE;
}