From 40a69b2ad7fc03dd28e985ec95dcc18967c6454f Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 15 May 2019 22:26:58 +0300 Subject: Animation: treat F-Curves with no keys as if muted/not existing. When normally editing curves, deleting the last keyframe also deletes the curve. Thus if for some reason it didn't happen, e.g. maybe due to removing keys directly via Python, skip the bad curve instead of resetting the channel to zero. --- source/blender/editors/interface/interface_anim.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/interface/interface_anim.c') diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index b9de504f3b2..e34d67b6996 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -82,6 +82,11 @@ void ui_but_anim_flag(uiBut *but, float cfra) if (fcu) { if (!driven) { + /* Empty curves are ignored by the animation evaluation system. */ + if (fcu->totvert == 0) { + return; + } + but->flag |= UI_BUT_ANIMATED; /* T41525 - When the active action is a NLA strip being edited, -- cgit v1.2.3