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>2017-12-13 17:53:04 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-13 17:53:04 +0300
commit118178d17639964b2e30bdba65a1de5c39c3435b (patch)
tree0bfc1ffed2d5882ab5a13ccb65e8ada398d83d8e /source/blender/blenkernel/intern/anim_sys.c
parentec3d25803ec544c3b6cccee45f8e943ee46f28a6 (diff)
Depsgraph / Animation: Rmove direct ID tagging from animation code
New dependency graph is supposed to have relation from animation node to the node which corresponds to a property which is modified by that curve. This means it is up to dependency graph to flush recalc flags, and no manual control is needed in the animation code.
Diffstat (limited to 'source/blender/blenkernel/intern/anim_sys.c')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 07de2ad6342..34f928ad4b6 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1563,12 +1563,6 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
/* caller must ensure this is animatable */
BLI_assert(RNA_property_animateable(ptr, prop) || ptr->id.data == NULL);
- /* set value for animatable numerical values only
- * HACK: some local F-Curves (e.g. those on NLA Strips) are evaluated
- * without an ID provided, which causes the animateable test to fail!
- */
- bool written = false;
-
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
{
@@ -1576,13 +1570,11 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
if (array_index != -1) {
if (RNA_property_boolean_get_index(ptr, prop, array_index) != value_coerce) {
RNA_property_boolean_set_index(ptr, prop, array_index, value_coerce);
- written = true;
}
}
else {
if (RNA_property_boolean_get(ptr, prop) != value_coerce) {
RNA_property_boolean_set(ptr, prop, value_coerce);
- written = true;
}
}
break;
@@ -1594,13 +1586,11 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
if (array_index != -1) {
if (RNA_property_int_get_index(ptr, prop, array_index) != value_coerce) {
RNA_property_int_set_index(ptr, prop, array_index, value_coerce);
- written = true;
}
}
else {
if (RNA_property_int_get(ptr, prop) != value_coerce) {
RNA_property_int_set(ptr, prop, value_coerce);
- written = true;
}
}
break;
@@ -1612,13 +1602,11 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
if (array_index != -1) {
if (RNA_property_float_get_index(ptr, prop, array_index) != value_coerce) {
RNA_property_float_set_index(ptr, prop, array_index, value_coerce);
- written = true;
}
}
else {
if (RNA_property_float_get(ptr, prop) != value_coerce) {
RNA_property_float_set(ptr, prop, value_coerce);
- written = true;
}
}
break;
@@ -1628,7 +1616,6 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
const int value_coerce = (int)value;
if (RNA_property_enum_get(ptr, prop) != value_coerce) {
RNA_property_enum_set(ptr, prop, value_coerce);
- written = true;
}
break;
}
@@ -1657,20 +1644,6 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
}
#endif
- /* as long as we don't do property update, we still tag datablock
- * as having been updated. this flag does not cause any updates to
- * be run, it's for e.g. render engines to synchronize data */
- if (written && ptr->id.data) {
- ID *id = ptr->id.data;
-
- /* for cases like duplifarmes it's only a temporary so don't
- * notify anyone of updates */
- if (!(id->tag & LIB_TAG_ANIM_NO_RECALC)) {
- BKE_id_tag_set_atomic(id, LIB_TAG_ID_RECALC);
- DEG_id_type_tag(G.main, GS(id->name));
- }
- }
-
/* successful */
return true;
}
@@ -2614,17 +2587,6 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData
/* 3. free temporary evaluation data that's not used elsewhere */
BLI_freelistN(&estrips);
-
- /* Tag ID as updated so render engines will recognize changes in data
- * which is animated but doesn't have actions.
- */
- if (ptr->id.data != NULL) {
- ID *id = ptr->id.data;
- if (!(id->tag & LIB_TAG_ANIM_NO_RECALC)) {
- id->tag |= LIB_TAG_ID_RECALC;
- DEG_id_type_tag(G.main, GS(id->name));
- }
- }
}
/* NLA Evaluation function (mostly for use through do_animdata)