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:
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval.cc')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index ad88cf656ad..c816c7b8db5 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -41,6 +41,10 @@
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
+#ifdef WITH_PYTHON
+# include "BPY_extern.h"
+#endif
+
#include "atomic_ops.h"
#include "intern/depsgraph.h"
@@ -375,6 +379,11 @@ void deg_evaluate_on_refresh(Depsgraph *graph)
graph->debug.begin_graph_evaluation();
+#ifdef WITH_PYTHON
+ /* Release the GIL so that Python drivers can be evaluated. See T91046. */
+ BPy_BEGIN_ALLOW_THREADS;
+#endif
+
graph->is_evaluating = true;
depsgraph_ensure_view_layer(graph);
/* Set up evaluation state. */
@@ -415,6 +424,10 @@ void deg_evaluate_on_refresh(Depsgraph *graph)
deg_graph_clear_tags(graph);
graph->is_evaluating = false;
+#ifdef WITH_PYTHON
+ BPy_END_ALLOW_THREADS;
+#endif
+
graph->debug.end_graph_evaluation();
}