AutoMerge Keyframes option for Action/NLA editors will now also delete duplicate keyframes if a Duplicate (SHIFT-DKEY) operation is cancelled.

This commit is contained in:
Joshua Leung
2008-07-10 01:47:51 +00:00
parent 5c82516261
commit 3d7358539d

View File

@@ -3610,6 +3610,7 @@ void special_aftertrans_update(TransInfo *t)
Base *base;
short redrawipo=0, resetslowpar=1;
int cancelled= (t->state == TRANS_CANCEL);
short duplicate= (t->undostr && strstr(t->undostr, "Duplicate")) ? 1 : 0;
if (t->spacetype==SPACE_VIEW3D) {
if (G.obedit) {
@@ -3622,7 +3623,7 @@ void special_aftertrans_update(TransInfo *t)
}
}
}
if (t->spacetype == SPACE_ACTION) {
else if (t->spacetype == SPACE_ACTION) {
void *data;
short datatype;
@@ -3644,7 +3645,7 @@ void special_aftertrans_update(TransInfo *t)
/* Do curve cleanups? */
if ( (G.saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
(cancelled == 0) )
((cancelled == 0) || (duplicate)) )
{
posttrans_action_clean((bAction *)data);
}
@@ -3659,7 +3660,7 @@ void special_aftertrans_update(TransInfo *t)
IpoCurve *icu;
if ( (G.saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
(cancelled == 0) )
((cancelled == 0) || (duplicate)) )
{
posttrans_ipo_clean(key->ipo);
}
@@ -3685,7 +3686,7 @@ void special_aftertrans_update(TransInfo *t)
/* after transform, remove duplicate keyframes on a frame that resulted from transform */
if ( (G.snla->flag & SNLA_NOTRANSKEYCULL)==0 &&
(cancelled == 0) )
((cancelled == 0) || (duplicate)) )
{
posttrans_nla_clean(t);
}