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:
authorWillian Padovani Germano <wpgermano@gmail.com>2008-07-26 02:30:03 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2008-07-26 02:30:03 +0400
commitf6b85a55fa16349f59fdee736a6dc62cc4f022ac (patch)
treeae6e36ab81de6e920da6df66f74499f6eca02dfc /source/blender/python/api2_2x/sceneRender.c
parent229a5809bbbe3221cd69b05b640d7596c85ed909 (diff)
== PyNodes ==
Early Ehlinger reported a deadlock when a script tells Blender to render an animation and there are pynodes. While investigating I saw related crashes in bg (blender -b) mode, still not fixed. This commit tries to fix the problem for interactive mode, then. What it does is releasing the lock before rendering and relocking after that, like theeth suggests in the bug report: http://projects.blender.org/tracker/?func=detail&atid=125&aid=17389&group_id=9
Diffstat (limited to 'source/blender/python/api2_2x/sceneRender.c')
-rw-r--r--source/blender/python/api2_2x/sceneRender.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c
index d382d450970..8f251fc8452 100644
--- a/source/blender/python/api2_2x/sceneRender.c
+++ b/source/blender/python/api2_2x/sceneRender.c
@@ -565,6 +565,8 @@ PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
PyObject *RenderData_RenderAnim( BPy_RenderData * self )
{
Scene *oldsce;
+ /* this prevents a deadlock when there are pynodes: */
+ PyThreadState *tstate = PyEval_SaveThread();
if (!G.background) {
oldsce = G.scene;
@@ -582,9 +584,9 @@ PyObject *RenderData_RenderAnim( BPy_RenderData * self )
if (G.scene->r.sfra > G.scene->r.efra)
return EXPP_ReturnPyObjError (PyExc_RuntimeError,
"start frame must be less or equal to end frame");
-
RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra);
}
+ PyEval_RestoreThread(tstate);
Py_RETURN_NONE;
}