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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-11 00:32:58 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-11 00:45:51 +0300
commit30887fc387e8b86fa97fbd64141993950124f0a7 (patch)
treed25869b681f0ee5e0831626d0d0ff0d1dd20b3c9 /intern/cycles/blender/blender_python.cpp
parent8096f36796ae07a1a76e99abbaf216ab29260b74 (diff)
Cycles: add function to clear resumable chunk
Diffstat (limited to 'intern/cycles/blender/blender_python.cpp')
-rw-r--r--intern/cycles/blender/blender_python.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index ffd1c70a4e4..3ab8c8bd6d9 100644
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@ -937,6 +937,15 @@ static PyObject *set_resumable_chunk_range_func(PyObject * /*self*/, PyObject *a
Py_RETURN_NONE;
}
+static PyObject *clear_resumable_chunk_func(PyObject * /*self*/, PyObject * /*value*/)
+{
+ VLOG(1) << "Clear resumable render";
+ BlenderSession::num_resumable_chunks = 0;
+ BlenderSession::current_resumable_chunk = 0;
+
+ Py_RETURN_NONE;
+}
+
static PyObject *enable_print_stats_func(PyObject * /*self*/, PyObject * /*args*/)
{
BlenderSession::print_render_stats = true;
@@ -992,6 +1001,7 @@ static PyMethodDef methods[] = {
/* Resumable render */
{"set_resumable_chunk", set_resumable_chunk_func, METH_VARARGS, ""},
{"set_resumable_chunk_range", set_resumable_chunk_range_func, METH_VARARGS, ""},
+ {"clear_resumable_chunk", clear_resumable_chunk_func, METH_NOARGS, ""},
/* Compute Device selection */
{"get_device_types", get_device_types_func, METH_VARARGS, ""},