diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-15 22:26:58 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-15 22:35:15 +0300 |
commit | 40a69b2ad7fc03dd28e985ec95dcc18967c6454f (patch) | |
tree | 38e707bad4a3a6f427485e4db017bde6407c2777 /source/blender/editors/interface/interface_anim.c | |
parent | 198c00f4ed09f8b9c7273c40f93c7f2630f14624 (diff) |
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.
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 5 |
1 files changed, 5 insertions, 0 deletions
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, |