Fix T39015: NLA Clip Auto Blend In/Out Check Box Not Working

Fix for regression accidentally introduced in 5f18d863a9 (affecting current 2.70 rc-1)
which means that this setting wasn't working anymore at all.
This commit is contained in:
Joshua Leung 2014-03-07 19:11:53 +13:00
parent 6ddd54f5a5
commit c31c8fa14e
Notes: blender-bot 2023-02-14 11:03:47 +01:00
Referenced by issue #39015, NLA Clip Auto Blend In/Out Check Box Not Working
1 changed files with 9 additions and 3 deletions

View File

@ -236,8 +236,8 @@ static void rna_NlaStrip_use_auto_blend_set(PointerRNA *ptr, int value)
NlaStrip *data = (NlaStrip *)ptr->data;
if (value) {
/* set the flag, then make sure a curve for this exists */
data->flag |= NLASTRIP_FLAG_USR_INFLUENCE;
/* set the flag */
data->flag |= NLASTRIP_FLAG_AUTO_BLENDS;
/* validate state to ensure that auto-blend gets applied immediately */
if (ptr->id.data) {
@ -249,7 +249,13 @@ static void rna_NlaStrip_use_auto_blend_set(PointerRNA *ptr, int value)
}
}
else {
data->flag &= ~NLASTRIP_FLAG_USR_INFLUENCE;
/* clear the flag */
data->flag &= ~NLASTRIP_FLAG_AUTO_BLENDS;
/* clear the values too, so that it's clear that there has been an effect */
/* TODO: it's somewhat debatable whether it's better to leave these in instead... */
data->blendin = 0.0f;
data->blendout = 0.0f;
}
}