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:
authorCampbell Barton <ideasman42@gmail.com>2010-12-14 13:17:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-14 13:17:13 +0300
commit58f31f8a5d52ec8d043ae92a249804216f626fda (patch)
tree95fc0afa6d4e2104f03437a5ec97203e475b1e6c /source/blender/editors/space_graph
parent996bc87793ebb6ad2b347c8e5fce1f2987607c58 (diff)
Change set handle types back to menu now menus have key access - V+A, V+V, V+L, V+F
for Graph & Edit Curve view. Editcurve can be Hkey for hide again.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c22
-rw-r--r--source/blender/editors/space_graph/graph_intern.h2
-rw-r--r--source/blender/editors/space_graph/graph_ops.c10
3 files changed, 16 insertions, 18 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index a9336046ea5..e9fcb182c8f 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1352,14 +1352,6 @@ void GRAPH_OT_interpolation_type (wmOperatorType *ot)
/* ******************** Set Handle-Type Operator *********************** */
-EnumPropertyItem graphkeys_handle_type_items[] = {
- {HD_FREE, "FREE", 0, "Free", ""},
- {HD_VECT, "VECTOR", 0, "Vector", ""},
- {HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
- {HD_AUTO, "AUTO", 0, "Auto", "Handles that are automatically adjusted upon moving the keyframe. Whole curve"},
- {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot. Whole curve"},
- {0, NULL, 0, NULL, NULL}};
-
/* ------------------- */
/* this function is responsible for setting handle-type of selected keyframes */
@@ -1424,14 +1416,24 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
- void GRAPH_OT_handle_type (wmOperatorType *ot)
+ void GRAPH_OT_handle_type_set (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";
+ ot->idname= "GRAPH_OT_handle_type_set";
ot->description= "Set type of handle for selected keyframes";
/* api callbacks */
+ ot->invoke= WM_menu_invoke;
ot->exec= graphkeys_handletype_exec;
ot->poll= graphop_editable_keyframes_poll;
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index 560dabbb634..55279d9ae29 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -106,7 +106,7 @@ void GRAPH_OT_bake(struct wmOperatorType *ot);
void GRAPH_OT_sound_bake(struct wmOperatorType *ot);
void GRAPH_OT_smooth(struct wmOperatorType *ot);
-void GRAPH_OT_handle_type(struct wmOperatorType *ot);
+void GRAPH_OT_handle_type_set(struct wmOperatorType *ot);
void GRAPH_OT_interpolation_type(struct wmOperatorType *ot);
void GRAPH_OT_extrapolation_type(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index ab28d4d72ea..bbd0df3ecd2 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -239,7 +239,7 @@ void graphedit_operatortypes(void)
WM_operatortype_append(GRAPH_OT_snap);
WM_operatortype_append(GRAPH_OT_mirror);
WM_operatortype_append(GRAPH_OT_frame_jump);
- WM_operatortype_append(GRAPH_OT_handle_type);
+ WM_operatortype_append(GRAPH_OT_handle_type_set);
WM_operatortype_append(GRAPH_OT_interpolation_type);
WM_operatortype_append(GRAPH_OT_extrapolation_type);
WM_operatortype_append(GRAPH_OT_sample);
@@ -332,12 +332,8 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
WM_keymap_add_item(keymap, "GRAPH_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, 0, 0)->ptr, "type", HD_ALIGN);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", HD_AUTO);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, KM_ALT, 0)->ptr, "type", HD_FREE);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", VKEY, KM_PRESS, 0, 0)->ptr, "type", HD_VECT);
-
-
+ WM_keymap_add_item(keymap, "GRAPH_OT_handle_type_set", VKEY, KM_PRESS, 0, 0);
+
WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
/* destructive */