Fix T46037: Moving keys in NLA tweak mode on offset actions results in Bezier handles...
authorJoshua Leung <aligorith@gmail.com>
Fri, 5 Feb 2016 11:59:32 +0000 (00:59 +1300)
committerJoshua Leung <aligorith@gmail.com>
Fri, 5 Feb 2016 13:40:43 +0000 (02:40 +1300)
Patch by Alexander Gavrilov (angavrilov)

Reviewed by Joshua Leung (aligorith)

source/blender/editors/animation/keyframes_general.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/transform/transform_conversions.c

index 0e9e46bced023fa8cc7df430e15fbb71d13f304b..bd8aa211c462a4c1a9a74557fa2271b34363ca03 100644 (file)
@@ -998,9 +998,9 @@ short paste_animedit_keys(bAnimContext *ac, ListBase *anim_data,
                                        totmatch++;
                                        
                                        if (adt) {
-                                               ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+                                               ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
                                                paste_animedit_keys_fcurve(fcu, aci, offset, merge_mode, flip);
-                                               ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+                                               ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
                                        }
                                        else {
                                                paste_animedit_keys_fcurve(fcu, aci, offset, merge_mode, flip);
index 42730ff87fc87f3b730a2b71d4f14d3f86512bc5..35b334501168fa43a5d092dd0522c0db2d3d0b8f 100644 (file)
@@ -1586,9 +1586,9 @@ static void snap_action_keys(bAnimContext *ac, short mode)
                        ED_masklayer_snap_frames(ale->data, ac->scene, mode);
                }
                else if (adt) {
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0); 
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
                }
                else {
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
@@ -1700,9 +1700,9 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
                        /* TODO */
                }
                else if (adt) {
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0); 
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
                }
                else {
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
index bf66b3087fd61bb350765a7e9ddc0ee2808cb4f1..e5613353691d40fd17c5b8bab27a45b9382da299 100644 (file)
@@ -2115,9 +2115,9 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
                
                /* perform snapping */
                if (adt) {
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0); 
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
                }
                else 
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
@@ -2252,9 +2252,9 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
                
                /* perform actual mirroring */
                if (adt) {
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0); 
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
                }
                else 
                        ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, edit_cb, calchandles_fcurve);
index df0edae9a56062af6ca1153d6314385e9d82bda0..ab0db79d460607c71d4362d6b5ff5dd3e82bec84 100644 (file)
@@ -3390,9 +3390,9 @@ static void posttrans_action_clean(bAnimContext *ac, bAction *act)
                AnimData *adt = ANIM_nla_mapping_get(ac, ale);
                
                if (adt) {
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
                        posttrans_fcurve_clean(ale->key_data, false); /* only use handles in graph editor */
-                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+                       ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
                }
                else
                        posttrans_fcurve_clean(ale->key_data, false);  /* only use handles in graph editor */
@@ -6039,9 +6039,9 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
                                    ((canceled == 0) || (duplicate)) )
                                {
                                        if (adt) {
-                                               ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
+                                               ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 0);
                                                posttrans_fcurve_clean(fcu, false); /* only use handles in graph editor */
-                                               ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1);
+                                               ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 0);
                                        }
                                        else
                                                posttrans_fcurve_clean(fcu, false);  /* only use handles in graph editor */