2.5 - Keyframe types are now preserved after inserting keyframes which would overwrit...
[blender.git] / source / blender / editors / animation / keyframing.c
index e8451b0f979646a89ad2d62b3f3d7c85db721ae0..e3e72a532e2cbeee7458659be350b9a223e80362 100644 (file)
@@ -207,8 +207,13 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
                                        // TODO: perform some other operations?
                                }
                                else {
+                                       char oldKeyType= BEZKEYTYPE(fcu->bezt + i);
+                                       
                                        /* just brutally replace the values */
                                        *(fcu->bezt + i) = *bezt;
+                                       
+                                       /* special exception for keyframe type - copy value back so that this info isn't lost */
+                                       BEZKEYTYPE(fcu->bezt + i)= oldKeyType;
                                }
                        }
                }