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:
authorJoshua Leung <aligorith@gmail.com>2011-08-04 18:13:05 +0400
committerJoshua Leung <aligorith@gmail.com>2011-08-04 18:13:05 +0400
commit900928f8bf47b8f1bbb1b2cd863d2d9649c940a0 (patch)
treee5d20746f2a35a5dca94dba00d1d0dc1ff83eeec /source/blender/editors/space_graph
parent2ed11158db7cfc157c26475a2dcb5f513043cd72 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c19
1 files changed, 1 insertions, 18 deletions
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", "");
}
/* ************************************************************************** */