Commit: c105c59bb4e00d88c688f63c699dc78c0be4592a
Author: Joshua Leung
Date:   Sat Feb 6 00:59:32 2016 +1300
Branches: master
https://developer.blender.org/rBc105c59bb4e00d88c688f63c699dc78c0be4592a

Fix T46037: Moving keys in NLA tweak mode on offset actions results in Bezier 
handles getting stretched unreasonably

Patch by Alexander Gavrilov (angavrilov)

Reviewed by Joshua Leung (aligorith)

===================================================================

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

===================================================================

diff --git a/source/blender/editors/animation/keyframes_general.c 
b/source/blender/editors/animation/keyframes_general.c
index 0e9e46b..bd8aa21 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -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);
diff --git a/source/blender/editors/space_action/action_edit.c 
b/source/blender/editors/space_action/action_edit.c
index 42730ff..35b3345 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -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);
diff --git a/source/blender/editors/space_graph/graph_edit.c 
b/source/blender/editors/space_graph/graph_edit.c
index bf66b30..e561335 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -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);
diff --git a/source/blender/editors/transform/transform_conversions.c 
b/source/blender/editors/transform/transform_conversions.c
index df0edae..ab0db79 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -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 */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to