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/makesrna/intern/rna_depsgraph.c')
-rw-r--r--source/blender/makesrna/intern/rna_depsgraph.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c
index 447318da744..08f37de26ee 100644
--- a/source/blender/makesrna/intern/rna_depsgraph.c
+++ b/source/blender/makesrna/intern/rna_depsgraph.c
@@ -41,6 +41,7 @@
# include "BKE_anim.h"
# include "BKE_object.h"
+# include "BKE_scene.h"
# include "DEG_depsgraph_build.h"
# include "DEG_depsgraph_debug.h"
@@ -256,6 +257,11 @@ static void rna_Depsgraph_debug_stats(Depsgraph *depsgraph, char *result)
outer);
}
+static void rna_Depsgraph_update(Depsgraph *depsgraph, Main *bmain)
+{
+ BKE_scene_graph_update_tagged(depsgraph, bmain);
+}
+
/* Iteration over objects, simple version */
static void rna_Depsgraph_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
@@ -636,6 +642,15 @@ static void rna_def_depsgraph(BlenderRNA *brna)
RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0); /* needed for string return value */
RNA_def_function_output(func, parm);
+ /* Updates. */
+
+ func = RNA_def_function(srna, "update", "rna_Depsgraph_update");
+ RNA_def_function_ui_description(
+ 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);
+
/* Queries for original datablockls (the ones depsgraph is built for). */
prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);