[Bf-blender-cvs] [598cac0ce63] active-fcurve-keyframe: Clamp active keyframe to totvert when deleting
Hans Goudey
noreply at git.blender.org
Thu Jul 16 20:16:22 CEST 2020
Commit: 598cac0ce635318eed8308305ea9dab34208334d
Author: Hans Goudey
Date: Wed Jun 3 15:05:26 2020 -0400
Branches: active-fcurve-keyframe
https://developer.blender.org/rB598cac0ce635318eed8308305ea9dab34208334d
Clamp active keyframe to totvert when deleting
===================================================================
M source/blender/editors/animation/keyframes_general.c
===================================================================
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index fc9ec870496..88e99eb3797 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -125,6 +125,9 @@ bool delete_fcurve_keys(FCurve *fcu)
}
}
+ /* Make sure the active keyframe index isn't too large. */
+ CLAMP_MAX(fcu->active_key, fcu->totvert - 1);
+
/* Free the array of BezTriples if there are not keyframes */
if (fcu->totvert == 0) {
clear_fcurve_keys(fcu);
More information about the Bf-blender-cvs
mailing list