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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-05-12 11:29:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-05-12 14:06:36 +0300
commit31f0c27ae7d6f45cfde71cca8c4f791a089452a5 (patch)
tree62a41edbd0e3f40686fe5cd994e99e49dd8e06c9 /source/blender/makesrna
parent87fd1666542adf1507d78bf96574fd56a8be3af8 (diff)
Depsgraph: Add additional relations/id update tags
This calls are not strictly speaking needed for the old dependency graph, but due to more granular nature of upcoming depsgraph more actions requires update of relations of IDs. On the one hand this extra tags could be wrapped with if() statements, but on the other hand it makes sense to keep tag in sync so it's clear if some issue is caused by missing/extra tag or by depsgraph itself.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_animation.c1
-rw-r--r--source/blender/makesrna/intern/rna_camera.c9
-rw-r--r--source/blender/makesrna/intern/rna_object.c1
3 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index df1e6dd55dd..ac30c615438 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -112,6 +112,7 @@ static void rna_AnimData_action_set(PointerRNA *ptr, PointerRNA value)
adt = BKE_animdata_from_id(ownerId);
if (adt) {
adt->recalc |= ADT_RECALC_ANIM;
+ DAG_id_tag_update(ownerId, OB_RECALC_TIME);
}
}
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 2baaa5f7cec..16f74a05f7b 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -87,6 +87,13 @@ static void rna_Camera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointer
DAG_id_tag_update(&camera->id, 0);
}
+static void rna_Camera_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ Camera *camera = (Camera *)ptr->id.data;
+ DAG_relations_tag_update(bmain);
+ DAG_id_tag_update(&camera->id, 0);
+}
+
#else
static void rna_def_camera_stereo_data(BlenderRNA *brna)
@@ -356,7 +363,7 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "dof_ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "DOF Object", "Use this object to define the depth of field focal point");
- RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_dependency_update");
prop = RNA_def_property(srna, "gpu_dof", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "GPUDOFSettings");
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 8bb3e9c265b..2ef5c6ec12e 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -949,6 +949,7 @@ static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, ptr->id.data);
WM_main_add_notifier(NC_MATERIAL | ND_SHADING_LINKS, NULL);
+ DAG_relations_tag_update(bmain);
}
static char *rna_MaterialSlot_path(PointerRNA *ptr)