Merge branch 'blender-v2.91-release'

This commit is contained in:
Campbell Barton 2020-10-22 16:00:48 +11:00
commit 0c36255c48
1 changed files with 3 additions and 2 deletions

View File

@ -842,7 +842,8 @@ bool BKE_fcurve_calc_range(
void BKE_fcurve_active_keyframe_set(FCurve *fcu, const BezTriple *active_bezt)
{
/* The active keyframe should always be selected. */
BLI_assert(active_bezt == NULL || (active_bezt->f2 & SELECT));
BLI_assert((active_bezt == NULL) ||
((active_bezt->f1 | active_bezt->f2 | active_bezt->f3) & SELECT));
fcu->active_keyframe_index = (active_bezt == NULL) ? FCURVE_ACTIVE_KEYFRAME_NONE :
active_bezt - fcu->bezt;
}
@ -861,7 +862,7 @@ int BKE_fcurve_active_keyframe_index(const FCurve *fcu)
}
const BezTriple *active_bezt = &fcu->bezt[active_keyframe_index];
if ((active_bezt->f2 & SELECT) == 0) {
if (((active_bezt->f1 | active_bezt->f2 | active_bezt->f3) & SELECT) == 0) {
/* The active keyframe should always be selected. If it's not selected, it can't be active. */
return FCURVE_ACTIVE_KEYFRAME_NONE;
}