From 900928f8bf47b8f1bbb1b2cd863d2d9649c940a0 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 4 Aug 2011 14:13:05 +0000 Subject: Bassam Feature Request: "Auto Clamped" handles can now be set per handle/key This used to be a weird per-curve setting which would happen to get applied/work correctly if handles were set to "auto", and was a source of constant confusion for both old and new animators. The main effect of this handle-type/option was really to just ensure that auto-handles stayed horizontal, instead of tilting as the keys were moved. This commit simply changes this from a per-curve to per keyframe/handle setting. --- source/blender/editors/space_graph/graph_edit.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index d88a18ffcbc..900aa6f6197 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1447,8 +1447,6 @@ void GRAPH_OT_interpolation_type (wmOperatorType *ot) /* ******************** Set Handle-Type Operator *********************** */ -/* ------------------- */ - /* this function is responsible for setting handle-type of selected keyframes */ static void sethandles_graph_keys(bAnimContext *ac, short mode) { @@ -1471,12 +1469,6 @@ static void sethandles_graph_keys(bAnimContext *ac, short mode) /* any selected keyframes for editing? */ if (ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, sel_cb, NULL)) { - /* for auto/auto-clamped, toggle the auto-handles flag on the F-Curve */ - if (mode == HD_AUTO_ANIM) - fcu->flag |= FCURVE_AUTO_HANDLES; - else if (mode == HD_AUTO) - fcu->flag &= ~FCURVE_AUTO_HANDLES; - /* change type of selected handles */ ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, edit_cb, calchandles_fcurve); } @@ -1513,15 +1505,6 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) void GRAPH_OT_handle_type (wmOperatorType *ot) { - /* sync with editcurve_handle_type_items */ - static EnumPropertyItem graphkeys_handle_type_items[] = { - {HD_AUTO, "AUTO", 0, "Automatic", "Handles that are automatically adjusted upon moving the keyframe. Whole curve"}, - {HD_VECT, "VECTOR", 0, "Vector", ""}, - {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, - {HD_FREE, "FREE_ALIGN", 0, "Free", ""}, - {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot. Whole curve"}, - {0, NULL, 0, NULL, NULL}}; - /* identifiers */ ot->name= "Set Keyframe Handle Type"; ot->idname= "GRAPH_OT_handle_type"; @@ -1536,7 +1519,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - ot->prop= RNA_def_enum(ot->srna, "type", graphkeys_handle_type_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", ""); } /* ************************************************************************** */ -- cgit v1.2.3