Revision: 15516
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15516
Author:   aligorith
Date:     2008-07-10 03:47:51 +0200 (Thu, 10 Jul 2008)

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

Modified Paths:
--------------
    trunk/blender/source/blender/src/transform_conversions.c

Modified: trunk/blender/source/blender/src/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/src/transform_conversions.c    2008-07-10 
00:46:19 UTC (rev 15515)
+++ trunk/blender/source/blender/src/transform_conversions.c    2008-07-10 
01:47:51 UTC (rev 15516)
@@ -3610,6 +3610,7 @@
        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 @@
                        }
                }
        }
-       if (t->spacetype == SPACE_ACTION) {
+       else if (t->spacetype == SPACE_ACTION) {
                void *data;
                short datatype;
                
@@ -3644,7 +3645,7 @@
                        
                        /* Do curve cleanups? */
                        if ( (G.saction->flag & SACTION_NOTRANSKEYCULL)==0 && 
-                            (cancelled == 0) )
+                            ((cancelled == 0) || (duplicate)) )
                        {
                                posttrans_action_clean((bAction *)data);
                        }
@@ -3659,7 +3660,7 @@
                                IpoCurve *icu;
                                
                                if ( (G.saction->flag & 
SACTION_NOTRANSKEYCULL)==0 && 
-                                    (cancelled == 0) )
+                                    ((cancelled == 0) || (duplicate)) )
                                {
                                        posttrans_ipo_clean(key->ipo);
                                }
@@ -3685,7 +3686,7 @@
                
                /* 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);
                }


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to