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:
-rw-r--r--source/blender/editors/animation/keyframes_edit.c13
-rw-r--r--source/blender/editors/space_graph/graph_edit.c4
2 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index ed40845a47c..f8277cf6a85 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -1303,6 +1303,12 @@ void ANIM_fcurve_equalize_keyframes_loop(FCurve *fcu,
/* Perform handle equalization if mode is 'Both' or 'Left'. */
if (mode & EQUALIZE_HANDLES_LEFT) {
+ /*If left handle type is 'Auto', 'Auto Clamped', or 'Vector', convert handles to 'Aligned'.*/
+ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) {
+ bezt->h1 = HD_ALIGN;
+ bezt->h2 = HD_ALIGN;
+ }
+
if (flatten) {
handle_flatten(bezt->vec, 0, flat_direction_left);
}
@@ -1313,6 +1319,13 @@ void ANIM_fcurve_equalize_keyframes_loop(FCurve *fcu,
/* Perform handle equalization if mode is 'Both' or 'Right'. */
if (mode & EQUALIZE_HANDLES_RIGHT) {
+ /*If right handle type is 'Auto', 'Auto Clamped', or 'Vector', convert handles to
+ * 'Aligned'.*/
+ if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) {
+ bezt->h1 = HD_ALIGN;
+ bezt->h2 = HD_ALIGN;
+ }
+
if (flatten) {
handle_flatten(bezt->vec, 2, flat_direction_right);
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 2083a26f638..cfc4fcf8dad 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -2404,8 +2404,8 @@ void GRAPH_OT_equalize_handles(wmOperatorType *ot)
ot->name = "Equalize Handles";
ot->idname = "GRAPH_OT_equalize_handles";
ot->description =
- "Ensure selected keyframes' handles have equal length, optionally making them horizontal";
-
+ "Ensure selected keyframes' handles have equal length, optionally making them horizontal. "
+ "Automatic, Automatic Clamped, or Vector handle types will be converted to Aligned";
/* API callbacks */
ot->invoke = WM_menu_invoke;
ot->exec = graphkeys_equalize_handles_exec;