Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-07-10 05:47:51 +0400
committerJoshua Leung <aligorith@gmail.com>2008-07-10 05:47:51 +0400
commit3d7358539df4526ffc2c2bbd40cf2001c5acf374 (patch)
tree9bb76da3ffc90b23d6f92ce162a17987e17fdcf5 /source/blender/src
parent5c825162616b39a70639ead6d7f4146c84e0b13f (diff)
AutoMerge Keyframes option for Action/NLA editors will now also delete duplicate keyframes if a Duplicate (SHIFT-DKEY) operation is cancelled.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/transform_conversions.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index dcebf6b7557..10e49cdd218 100644
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -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);
}