From a5cfeaba9ee26b4a5e917745c664d1ed16393b21 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 23 Dec 2018 17:31:55 +0300 Subject: Fix missing update when deleting animation channels. --- source/blender/editors/animation/anim_channels_edit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/animation/anim_channels_edit.c') diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 84b59835750..2ace4874dae 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -58,6 +58,7 @@ #include "BKE_global.h" #include "BKE_scene.h" +#include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" #include "UI_view2d.h" @@ -1672,8 +1673,10 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) } /* free the group itself */ - if (adt->action) + 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); + } else MEM_freeN(agrp); } @@ -1698,6 +1701,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) /* try to free F-Curve */ ANIM_fcurve_delete_from_animdata(&ac, adt, fcu); + ale->update = ANIM_UPDATE_DEPS; break; } case ANIMTYPE_NLACURVE: @@ -1719,6 +1723,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) /* unlink and free the F-Curve */ BLI_remlink(&strip->fcurves, fcu); free_fcurve(fcu); + ale->update = ANIM_UPDATE_DEPS; break; } case ANIMTYPE_GPLAYER: @@ -1729,6 +1734,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) /* try to delete the layer's data and the layer itself */ BKE_gpencil_layer_delete(gpd, gpl); + ale->update = ANIM_UPDATE_DEPS; break; } case ANIMTYPE_MASKLAYER: @@ -1745,6 +1751,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) } /* cleanup */ + ANIM_animdata_update(&ac, &anim_data); ANIM_animdata_freelist(&anim_data); /* send notifier that things have changed */ -- cgit v1.2.3