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>2019-03-13 17:38:45 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-03-13 17:51:44 +0300
commit0e9ea707b5e5be2a38dd29dded3dd6c25a5e1992 (patch)
tree6b68505ac06a9fbf5d6a5c6a1cea794d0326adcc /source/blender/editors/animation
parentbc5b0f7a091c3955263701be8c858fd56f8ba59f (diff)
Fix T58721: Keyframing one transform option reset other transforms
Use dedicated flag to tag animation just for copy-on-write synchronization, which makes it so copies of the original data blocks gets in sync with the original ID. This will not flush the animation update to all objects which depend on that animation. If such flush is required, use ID_RECALC_ANIMATION. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4508
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c10
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c6
-rw-r--r--source/blender/editors/animation/anim_deps.c4
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c2
-rw-r--r--source/blender/editors/animation/keyframing.c10
-rw-r--r--source/blender/editors/animation/keyingsets.c2
6 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index d1cef1cfa17..e3138dee1a7 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -4059,13 +4059,13 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
}
- /* tag copy-on-write flushing (so that the settings will have an effect) */
+ /* Tag for full animation update, so that the settings will have an effect. */
if (ale_setting->id) {
- DEG_id_tag_update(ale_setting->id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(ale_setting->id, ID_RECALC_ANIMATION);
}
if (ale_setting->adt && ale_setting->adt->action) {
- /* action is it's own datablock, so has to be tagged specifically... */
- DEG_id_tag_update(&ale_setting->adt->action->id, ID_RECALC_COPY_ON_WRITE);
+ /* Action is it's own datablock, so has to be tagged specifically. */
+ DEG_id_tag_update(&ale_setting->adt->action->id, ID_RECALC_ANIMATION);
}
/* verify animation context */
@@ -4109,7 +4109,7 @@ static void achannel_nlatrack_solo_widget_cb(bContext *C, void *ale_poin, void *
BKE_nlatrack_solo_toggle(adt, nlt);
/* send notifiers */
- DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION);
WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL);
}
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 3bcbe2d99e3..acffbd56b18 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -1350,7 +1350,7 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
switch (ac.datatype) {
case ANIMCONT_NLA: /* NLA-tracks only */
rearrange_nla_channels(&ac, adt, mode);
- DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION);
break;
case ANIMCONT_DRIVERS: /* Drivers list only */
@@ -1637,7 +1637,7 @@ static void update_dependencies_on_delete(bAnimListElem *ale)
if (adt != NULL) {
DEG_id_tag_update(id, ID_RECALC_ANIMATION);
if (adt->action != NULL) {
- DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION);
}
}
/* Deals with NLA and drivers.
@@ -1693,7 +1693,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
/* free the group itself */
if (adt->action) {
BLI_freelinkN(&adt->action->groups, agrp);
- DEG_id_tag_update_ex(CTX_data_main(C), &adt->action->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update_ex(CTX_data_main(C), &adt->action->id, ID_RECALC_ANIMATION);
}
else
MEM_freeN(agrp);
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 7bef42d8682..dfb1a456364 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -72,13 +72,13 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
if (adt) {
DEG_id_tag_update(id, ID_RECALC_ANIMATION);
if (adt->action != NULL) {
- DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION);
}
}
/* Tag copy on the main object if updating anything directly inside AnimData */
if (ELEM(ale->type, ANIMTYPE_ANIMDATA, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, ANIMTYPE_NLACURVE)) {
- DEG_id_tag_update(id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(id, ID_RECALC_ANIMATION);
return;
}
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 40454bcad0c..8edad506a33 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -100,7 +100,7 @@ static void delete_fmodifier_cb(bContext *C, void *ctx_v, void *fcm_v)
/* send notifiers */
// XXX for now, this is the only way to get updates in all the right places... but would be nice to have a special one in this case
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
- DEG_id_tag_update(ctx->fcurve_owner_id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(ctx->fcurve_owner_id, ID_RECALC_ANIMATION);
}
/* --------------- */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 1922b876d1e..513fd29ef9b 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -157,7 +157,7 @@ bAction *verify_adt_action(Main *bmain, ID *id, short add)
DEG_relations_tag_update(bmain);
}
- DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION_NO_FLUSH);
/* return the action */
return adt->action;
@@ -1317,10 +1317,10 @@ short insert_keyframe(
if (ret) {
if (act != NULL) {
- DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(&act->id, ID_RECALC_ANIMATION_NO_FLUSH);
}
if (adt != NULL && adt->action != NULL && adt->action != act) {
- DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION_NO_FLUSH);
}
}
@@ -1371,11 +1371,11 @@ static void deg_tag_after_keyframe_delete(Main *bmain, ID *id, AnimData *adt)
/* In the case last f-curve wes removed need to inform dependency graph
* about relations update, since it needs to get rid of animation operation
* for this datablock. */
- DEG_id_tag_update_ex(bmain, id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update_ex(bmain, id, ID_RECALC_ANIMATION_NO_FLUSH);
DEG_relations_tag_update(bmain);
}
else {
- DEG_id_tag_update_ex(bmain, &adt->action->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update_ex(bmain, &adt->action->id, ID_RECALC_ANIMATION_NO_FLUSH);
}
}
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 444e4634644..d532e22e7f7 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -1049,7 +1049,7 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe
break;
}
default:
- DEG_id_tag_update(ksp->id, ID_RECALC_COPY_ON_WRITE);
+ DEG_id_tag_update(ksp->id, ID_RECALC_ANIMATION_NO_FLUSH);
break;
}