diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
commit | c2fbe46b0f0fde44b8a40d89601a195da27d28fb (patch) | |
tree | f66e3e50758acb36001e2774c6e4ede5fc8bead6 /source/blender/makesrna/intern/rna_depsgraph.c | |
parent | 386ba094988fc793f8e060d15438566e5e2d2cae (diff) | |
parent | dcf57e34f3866bba5ddd9cfdfe858a1a5eedc4c2 (diff) |
Merge branch 'master' into temp-gpencil-drw-enginetemp-gpencil-drw-engine
Diffstat (limited to 'source/blender/makesrna/intern/rna_depsgraph.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_depsgraph.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index ebd9bd8e925..2072b07ecb3 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -261,8 +261,13 @@ static void rna_Depsgraph_debug_stats(Depsgraph *depsgraph, char *result) outer); } -static void rna_Depsgraph_update(Depsgraph *depsgraph, Main *bmain) +static void rna_Depsgraph_update(Depsgraph *depsgraph, Main *bmain, ReportList *reports) { + if (DEG_is_evaluating(depsgraph)) { + BKE_report(reports, RPT_ERROR, "Dependency graph update requested during evaluation"); + return; + } + # ifdef WITH_PYTHON /* Allow drivers to be evaluated */ BPy_BEGIN_ALLOW_THREADS; @@ -654,7 +659,7 @@ static void rna_def_depsgraph(BlenderRNA *brna) func, "Re-evaluate any modified data-blocks, for example for animation or modifiers. " "This invalidates all references to evaluated data-blocks from this dependency graph."); - RNA_def_function_flag(func, FUNC_USE_MAIN); + RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS); /* Queries for original datablockls (the ones depsgraph is built for). */ |