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/space_action/action_edit.c12
-rw-r--r--source/blender/editors/space_action/action_header.c20
-rw-r--r--source/blender/editors/space_action/action_intern.h6
-rw-r--r--source/blender/editors/space_action/action_ops.c12
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c6
-rw-r--r--source/blender/editors/space_graph/graph_edit.c92
-rw-r--r--source/blender/editors/space_graph/graph_header.c231
-rw-r--r--source/blender/editors/space_graph/graph_intern.h50
-rw-r--r--source/blender/editors/space_graph/graph_ops.c139
-rw-r--r--source/blender/editors/space_graph/graph_select.c16
10 files changed, 349 insertions, 235 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index b2f4751fa25..deaa6597bd2 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -853,11 +853,11 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ACT_OT_extrapolation_type_set (wmOperatorType *ot)
+void ACT_OT_extrapolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Extrapolation";
- ot->idname= "ACT_OT_extrapolation_type_set";
+ ot->idname= "ACT_OT_extrapolation_type";
/* api callbacks */
ot->invoke= WM_menu_invoke;
@@ -923,11 +923,11 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ACT_OT_interpolation_type_set (wmOperatorType *ot)
+void ACT_OT_interpolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Interpolation";
- ot->idname= "ACT_OT_interpolation_type_set";
+ ot->idname= "ACT_OT_interpolation_type";
/* api callbacks */
ot->invoke= WM_menu_invoke;
@@ -1011,11 +1011,11 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void ACT_OT_handle_type_set (wmOperatorType *ot)
+void ACT_OT_handle_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Handle Type";
- ot->idname= "ACT_OT_handle_type_set";
+ ot->idname= "ACT_OT_handle_type";
/* api callbacks */
ot->invoke= WM_menu_invoke;
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index 1bc30b2ac42..a9ce145088d 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -183,24 +183,24 @@ static void act_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_FREE);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_AUTO);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_VECT);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_ALIGN);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type_set", "type", HD_AUTO_ANIM); // xxx?
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_FREE);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_VECT);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_ALIGN);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO_ANIM); // xxx?
}
static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type_set", "type", BEZT_IPO_CONST);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type_set", "type", BEZT_IPO_LIN);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type_set", "type", BEZT_IPO_BEZ);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_CONST);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_LIN);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_BEZ);
}
static void act_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type_set", "type", FCURVE_EXTRAPOLATE_CONSTANT);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type_set", "type", FCURVE_EXTRAPOLATE_LINEAR);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
+ uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
static void act_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h
index 377b25030e5..6ccdc07421b 100644
--- a/source/blender/editors/space_action/action_intern.h
+++ b/source/blender/editors/space_action/action_intern.h
@@ -89,9 +89,9 @@ void ACT_OT_delete(struct wmOperatorType *ot);
void ACT_OT_clean(struct wmOperatorType *ot);
void ACT_OT_sample(struct wmOperatorType *ot);
-void ACT_OT_handle_type_set(struct wmOperatorType *ot);
-void ACT_OT_interpolation_type_set(struct wmOperatorType *ot);
-void ACT_OT_extrapolation_type_set(struct wmOperatorType *ot);
+void ACT_OT_handle_type(struct wmOperatorType *ot);
+void ACT_OT_interpolation_type(struct wmOperatorType *ot);
+void ACT_OT_extrapolation_type(struct wmOperatorType *ot);
void ACT_OT_frame_jump(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index 1a677e9191d..c023062453c 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -72,9 +72,9 @@ void action_operatortypes(void)
WM_operatortype_append(ACT_OT_snap);
WM_operatortype_append(ACT_OT_mirror);
WM_operatortype_append(ACT_OT_frame_jump);
- WM_operatortype_append(ACT_OT_handle_type_set);
- WM_operatortype_append(ACT_OT_interpolation_type_set);
- WM_operatortype_append(ACT_OT_extrapolation_type_set);
+ WM_operatortype_append(ACT_OT_handle_type);
+ WM_operatortype_append(ACT_OT_interpolation_type);
+ WM_operatortype_append(ACT_OT_extrapolation_type);
WM_operatortype_append(ACT_OT_sample);
WM_operatortype_append(ACT_OT_clean);
WM_operatortype_append(ACT_OT_delete);
@@ -130,9 +130,9 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
WM_keymap_add_item(keymap, "ACT_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
/* menu + set setting */
- WM_keymap_add_item(keymap, "ACT_OT_handle_type_set", HKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "ACT_OT_interpolation_type_set", TKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "ACT_OT_extrapolation_type_set", EKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_handle_type", HKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "ACT_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
/* destructive */
WM_keymap_add_item(keymap, "ACT_OT_clean", OKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 5b00205b5d0..ea4f017c9bb 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -989,7 +989,7 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa)
/* 'add modifier' button at top of panel */
// XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
- uiDefButO(block, BUT, "GRAPHEDIT_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 225, 150, 20, "Adds a new F-Curve Modifier for the active F-Curve");
+ uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, "Add Modifier", 10, 225, 150, 20, "Adds a new F-Curve Modifier for the active F-Curve");
/* draw each modifier */
for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next)
@@ -1069,10 +1069,10 @@ static int graph_properties(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_properties(wmOperatorType *ot)
+void GRAPH_OT_properties(wmOperatorType *ot)
{
ot->name= "Properties";
- ot->idname= "GRAPHEDIT_OT_properties";
+ ot->idname= "GRAPH_OT_properties";
ot->exec= graph_properties;
ot->poll= ED_operator_ipo_active; // xxx
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 49397ed0edd..8903d95b288 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -180,11 +180,11 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_previewrange_set (wmOperatorType *ot)
+void GRAPH_OT_previewrange_set (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Auto-Set Preview Range";
- ot->idname= "GRAPHEDIT_OT_previewrange_set";
+ ot->idname= "GRAPH_OT_previewrange_set";
/* api callbacks */
ot->exec= graphkeys_previewrange_exec;
@@ -227,11 +227,11 @@ static int graphkeys_viewall_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_view_all (wmOperatorType *ot)
+void GRAPH_OT_view_all (wmOperatorType *ot)
{
/* identifiers */
ot->name= "View All";
- ot->idname= "GRAPHEDIT_OT_view_all";
+ ot->idname= "GRAPH_OT_view_all";
/* api callbacks */
ot->exec= graphkeys_viewall_exec;
@@ -334,11 +334,11 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_ghost_curves_create (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_create (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Create Ghost Curves";
- ot->idname= "GRAPHEDIT_OT_ghost_curves_create";
+ ot->idname= "GRAPH_OT_ghost_curves_create";
ot->description= "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor.";
/* api callbacks */
@@ -377,11 +377,11 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_ghost_curves_clear (wmOperatorType *ot)
+void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Create Ghost Curves";
- ot->idname= "GRAPHEDIT_OT_ghost_curves_clear";
+ ot->idname= "GRAPH_OT_ghost_curves_clear";
ot->description= "Clear F-Curve snapshots (Ghosts) for active Graph Editor.";
/* api callbacks */
@@ -461,11 +461,11 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *
return graphkeys_click_insert_exec(C, op);
}
-void GRAPHEDIT_OT_keyframes_click_insert (wmOperatorType *ot)
+void GRAPH_OT_click_insert (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Click-Insert Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_click_insert";
+ ot->idname= "GRAPH_OT_click_insert";
/* api callbacks */
ot->invoke= graphkeys_click_insert_invoke;
@@ -544,11 +544,11 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_copy (wmOperatorType *ot)
+void GRAPH_OT_copy (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_copy";
+ ot->idname= "GRAPH_OT_copy";
/* api callbacks */
ot->exec= graphkeys_copy_exec;
@@ -583,11 +583,11 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_paste (wmOperatorType *ot)
+void GRAPH_OT_paste (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Paste Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_paste";
+ ot->idname= "GRAPH_OT_paste";
/* api callbacks */
ot->exec= graphkeys_paste_exec;
@@ -650,11 +650,11 @@ static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *even
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_duplicate (wmOperatorType *ot)
+void GRAPH_OT_duplicate (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Duplicate Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_duplicate";
+ ot->idname= "GRAPH_OT_duplicate";
/* api callbacks */
ot->invoke= graphkeys_duplicate_invoke;
@@ -711,11 +711,11 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_delete (wmOperatorType *ot)
+void GRAPH_OT_delete (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_delete";
+ ot->idname= "GRAPH_OT_delete";
/* api callbacks */
ot->invoke= WM_operator_confirm;
@@ -772,11 +772,11 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_clean (wmOperatorType *ot)
+void GRAPH_OT_clean (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clean Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_clean";
+ ot->idname= "GRAPH_OT_clean";
/* api callbacks */
//ot->invoke= // XXX we need that number popup for this!
@@ -853,11 +853,11 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_bake (wmOperatorType *ot)
+void GRAPH_OT_bake (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Bake Curve";
- ot->idname= "GRAPHEDIT_OT_keyframes_bake";
+ ot->idname= "GRAPH_OT_bake";
/* api callbacks */
ot->invoke= WM_operator_confirm; // FIXME...
@@ -979,11 +979,11 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_sample (wmOperatorType *ot)
+void GRAPH_OT_sample (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Sample Keyframes";
- ot->idname= "GRAPHEDIT_OT_keyframes_sample";
+ ot->idname= "GRAPH_OT_sample";
/* api callbacks */
ot->exec= graphkeys_sample_exec;
@@ -1053,11 +1053,11 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_extrapolation_type (wmOperatorType *ot)
+void GRAPH_OT_extrapolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Extrapolation";
- ot->idname= "GRAPHEDIT_OT_keyframes_extrapolation_type";
+ ot->idname= "GRAPH_OT_extrapolation_type";
/* api callbacks */
ot->invoke= WM_menu_invoke;
@@ -1121,11 +1121,11 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_interpolation_type (wmOperatorType *ot)
+void GRAPH_OT_interpolation_type (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Interpolation";
- ot->idname= "GRAPHEDIT_OT_keyframes_interpolation_type";
+ ot->idname= "GRAPH_OT_interpolation_type";
/* api callbacks */
ot->invoke= WM_menu_invoke;
@@ -1208,11 +1208,11 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_handletype (wmOperatorType *ot)
+void GRAPH_OT_handletype (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Keyframe Handle Type";
- ot->idname= "GRAPHEDIT_OT_keyframes_handletype";
+ ot->idname= "GRAPH_OT_handletype";
/* api callbacks */
ot->invoke= WM_menu_invoke;
@@ -1298,11 +1298,11 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-void GRAPHEDIT_OT_keyframes_euler_filter (wmOperatorType *ot)
+void GRAPH_OT_euler_filter (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Euler Filter";
- ot->idname= "GRAPHEDIT_OT_keyframes_euler_filter";
+ ot->idname= "GRAPH_OT_euler_filter";
/* api callbacks */
ot->exec= graphkeys_euler_filter_exec;
@@ -1314,10 +1314,10 @@ void GRAPHEDIT_OT_keyframes_euler_filter (wmOperatorType *ot)
#endif // XXX this is not ready for the primetime yet
-/* ***************** Snap Current Frame Operator *********************** */
+/* ***************** Jump to Selected Frames Operator *********************** */
/* snap current-frame indicator to 'average time' of selected keyframe */
-static int graphkeys_cfrasnap_exec(bContext *C, wmOperator *op)
+static int graphkeys_framejump_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
ListBase anim_data= {NULL, NULL};
@@ -1353,14 +1353,14 @@ static int graphkeys_cfrasnap_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_cfrasnap (wmOperatorType *ot)
+void GRAPH_OT_frame_jump (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Current Frame to Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_cfrasnap";
+ ot->name= "Jump to Frame";
+ ot->idname= "GRAPH_OT_frame_jump";
/* api callbacks */
- ot->exec= graphkeys_cfrasnap_exec;
+ ot->exec= graphkeys_framejump_exec;
ot->poll= ED_operator_areaactive;
/* flags */
@@ -1444,11 +1444,11 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_snap (wmOperatorType *ot)
+void GRAPH_OT_snap (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Snap Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_snap";
+ ot->idname= "GRAPH_OT_snap";
/* api callbacks */
ot->invoke= WM_menu_invoke;
@@ -1555,11 +1555,11 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_mirror (wmOperatorType *ot)
+void GRAPH_OT_mirror (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mirror Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_mirror";
+ ot->idname= "GRAPH_OT_mirror";
/* api callbacks */
ot->invoke= WM_menu_invoke;
@@ -1609,11 +1609,11 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_smooth (wmOperatorType *ot)
+void GRAPH_OT_smooth (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Smooth Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_smooth";
+ ot->idname= "GRAPH_OT_smooth";
/* api callbacks */
ot->exec= graphkeys_smooth_exec;
@@ -1671,11 +1671,11 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_fmodifier_add (wmOperatorType *ot)
+void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add F-Curve Modifier";
- ot->idname= "GRAPHEDIT_OT_fmodifier_add";
+ ot->idname= "GRAPH_OT_fmodifier_add";
/* api callbacks */
ot->invoke= WM_menu_invoke;
diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c
index 178b4b4562f..0bd08625d68 100644
--- a/source/blender/editors/space_graph/graph_header.c
+++ b/source/blender/editors/space_graph/graph_header.c
@@ -47,11 +47,14 @@
#include "ED_types.h"
#include "ED_util.h"
+#include "RNA_access.h"
+
#include "WM_api.h"
#include "WM_types.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "BIF_transform.h"
#include "UI_interface.h"
#include "UI_resources.h"
@@ -62,77 +65,174 @@
/* ********************************************************* */
/* Menu Defines... */
-/* button events */
-enum {
- B_REDR = 0,
- B_MODECHANGE,
-} eActHeader_ButEvents;
+static void graph_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ bScreen *sc= CTX_wm_screen(C);
+ ScrArea *sa= CTX_wm_area(C);
+ SpaceIpo *sipo= (SpaceIpo*)CTX_wm_space_data(C);
+ PointerRNA spaceptr;
+
+ /* retrieve state */
+ RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr);
+
+ /* create menu */
+ uiItemO(layout, NULL, ICON_MENU_PANEL, "GRAPH_OT_properties");
+
+ uiItemS(layout);
+
+ uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0, 0, 0);
+
+ if (sipo->flag & SIPO_NOHANDLES)
+ uiItemO(layout, "Show Handles", ICON_CHECKBOX_DEHLT, "GRAPH_OT_handles_view_toggle");
+ else
+ uiItemO(layout, "Show Handles", ICON_CHECKBOX_HLT, "GRAPH_OT_handles_view_toggle");
+
+ uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0, 0, 0);
+
+ if (sipo->flag & SIPO_DRAWTIME)
+ uiItemO(layout, "Show Frames", 0, "ANIM_OT_time_toggle");
+ else
+ uiItemO(layout, "Show Seconds", 0, "ANIM_OT_time_toggle");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_set");
+ uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_clear");
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_previewrange_set");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_frame_jump");
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_view_all");
+
+ if (sa->full)
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Tile Window", Ctrl UpArrow
+ else
+ uiItemO(layout, NULL, 0, "SCREEN_OT_screen_full_area"); // "Maximize Window", Ctrl DownArrow
+}
-/* ************************ header area region *********************** */
+static void graph_selectmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "GRAPH_OT_select_all_toggle");
+ uiItemBooleanO(layout, "Invert All", 0, "GRAPH_OT_select_all_toggle", "invert", 1);
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_select_border");
+ uiItemBooleanO(layout, "Border Axis Range", 0, "GRAPH_OT_select_border", "axis_range", 1);
+
+ uiItemS(layout);
+
+ uiItemEnumO(layout, "Columns on Selected Keys", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_KEYS);
+ uiItemEnumO(layout, "Column on Current Frame", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_CFRA);
+
+ uiItemEnumO(layout, "Columns on Selected Markers", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN);
+ uiItemEnumO(layout, "Between Selected Markers", 0, "GRAPH_OT_select_column", "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN);
+}
-static void do_viewmenu(bContext *C, void *arg, int event)
+static void graph_channelmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C);
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_toggle");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_enable");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_setting_disable");
- switch (event) {
- case 1: /* Show time/frames */
- sipo->flag ^= SIPO_DRAWTIME;
- break;
- case 2: /* AutoMerge Keyframes */
- sipo->flag ^= SIPO_NOTRANSKEYCULL;
- break;
- case 3: /* Show/Hide handles */
- sipo->flag ^= SIPO_NOHANDLES;
- break;
- case 4: /* Show current frame number beside indicator */
- sipo->flag ^= SIPO_NODRAWCFRANUM;
- break;
- }
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_editable_toggle");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_expand");
+ uiItemO(layout, NULL, 0, "ANIM_OT_channels_collapse");
}
-static uiBlock *graph_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
+static void graph_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- ScrArea *curarea= CTX_wm_area(C);
- SpaceIpo *sipo= (SpaceIpo *)CTX_wm_space_data(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
+ uiItemEnumO(layout, "Grab/Move", 0, "TFM_OT_transform", "mode", TFM_TIME_TRANSLATE);
+ uiItemEnumO(layout, "Extend", 0, "TFM_OT_transform", "mode", TFM_TIME_EXTEND);
+ uiItemEnumO(layout, "Scale", 0, "TFM_OT_transform", "mode", TFM_TIME_SCALE);
+}
+
+static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, "To Current Frame", 0, "GRAPH_OT_snap", "mode", GRAPHKEYS_SNAP_CFRA);
+ uiItemEnumO(layout, "To Nearest Frame", 0, "GRAPH_OT_snap", "mode", GRAPHKEYS_SNAP_NEAREST_FRAME);
+ uiItemEnumO(layout, "To Nearest Second", 0, "GRAPH_OT_snap", "mode", GRAPHKEYS_SNAP_NEAREST_SECOND);
+ uiItemEnumO(layout, "To Nearest Marker", 0, "GRAPH_OT_snap", "mode", GRAPHKEYS_SNAP_NEAREST_MARKER);
+}
+
+static void graph_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, "Over Current Frame", 0, "GRAPH_OT_mirror", "mode", GRAPHKEYS_MIRROR_CFRA);
+ uiItemEnumO(layout, "Over Vertical Axis", 0, "GRAPH_OT_mirror", "mode", GRAPHKEYS_MIRROR_YAXIS);
+ uiItemEnumO(layout, "Over Horizontal Axis", 0, "GRAPH_OT_mirror", "mode", GRAPHKEYS_MIRROR_XAXIS);
+ uiItemEnumO(layout, "Over Selected Marker", 0, "GRAPH_OT_mirror", "mode", GRAPHKEYS_MIRROR_MARKER);
+}
+
+static void graph_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_FREE);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_AUTO);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_VECT);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_ALIGN);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_AUTO_ANIM); // xxx?
+}
+
+static void graph_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_CONST);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_LIN);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_BEZ);
+}
+
+static void graph_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
+ uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
+}
+
+static void graph_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemMenuF(layout, "Transform", 0, graph_edit_transformmenu);
+ uiItemMenuF(layout, "Snap", 0, graph_edit_snapmenu);
+ uiItemMenuF(layout, "Mirror", 0, graph_edit_mirrormenu);
- block= uiBeginBlock(C, ar, "graph_viewmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_viewmenu, NULL);
+ uiItemS(layout);
- // XXX these options should use new menu-options
+ //uiItemO(layout, NULL, 0, "GRAPH_OT_insert");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_fmodifier_add");
- if (sipo->flag & SIPO_DRAWTIME) {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- }
- else {
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- }
+ uiItemS(layout);
+ uiItemO(layout, NULL, 0, "GRAPH_OT_duplicate");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_delete");
- uiDefIconTextBut(block, BUTM, 1, (sipo->flag & SIPO_NOTRANSKEYCULL)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "AutoMerge Keyframes|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- uiDefIconTextBut(block, BUTM, 1, (sipo->flag & SIPO_NOHANDLES)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "Show Handles|Ctrl H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, (sipo->flag & SIPO_NODRAWCFRANUM)?ICON_CHECKBOX_DEHLT:ICON_CHECKBOX_HLT,
- "Show Current Frame Number|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
+ uiItemS(layout);
- if (curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
+ uiItemMenuF(layout, "Handle Type", 0, graph_edit_handlesmenu);
+ uiItemMenuF(layout, "Interpolation Mode", 0, graph_edit_ipomenu);
+ uiItemMenuF(layout, "Extrapolation Mode", 0, graph_edit_expomenu);
- uiTextBoundsBlock(block, 50);
- uiEndBlock(C, block);
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "GRAPH_OT_clean");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_sample");
+
+ uiItemS(layout);
- return block;
+ uiItemO(layout, NULL, 0, "GRAPH_OT_copy");
+ uiItemO(layout, NULL, 0, "GRAPH_OT_paste");
}
+/* ********************************************************* */
+
+enum {
+ B_REDR = 0,
+ B_MODECHANGE,
+} eGraphEdit_Events;
+
static void do_graph_buttons(bContext *C, void *arg, int event)
{
switch (event) {
@@ -163,8 +263,19 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
int xmax;
xmax= GetButStringLength("View");
- uiDefPulldownBut(block, graph_viewmenu, CTX_wm_area(C),
- "View", xco, yco-2, xmax-3, 24, "");
+ uiDefMenuBut(block, graph_viewmenu, NULL, "View", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Select");
+ uiDefMenuBut(block, graph_selectmenu, NULL, "Select", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Channel");
+ uiDefMenuBut(block, graph_channelmenu, NULL, "Channel", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+
+ xmax= GetButStringLength("Key");
+ uiDefMenuBut(block, graph_editmenu, NULL, "Key", xco, yco, xmax-3, 20, "");
xco+= xmax;
}
@@ -202,8 +313,8 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
/* copy + paste */
uiBlockBeginAlign(block);
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer");
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer");
+ uiDefIconButO(block, BUT, "GRAPH_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer");
+ uiDefIconButO(block, BUT, "GRAPH_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer");
uiBlockEndAlign(block);
xco += (XIC + 8);
@@ -225,9 +336,9 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
/* ghost curves */
// XXX these icons need to be changed
if (sipo->ghostCurves.first)
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_ghost_curves_clear", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_DATA_CURVE, xco,yco,XIC,YIC, "Clear F-Curve snapshots (Ghosts) for this Graph Editor instance");
+ uiDefIconButO(block, BUT, "GRAPH_OT_ghost_curves_clear", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_DATA_CURVE, xco,yco,XIC,YIC, "Clear F-Curve snapshots (Ghosts) for this Graph Editor instance");
else
- uiDefIconButO(block, BUT, "GRAPHEDIT_OT_ghost_curves_create", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_OB_CURVE, xco,yco,XIC,YIC, "Create snapshot (Ghosts) of selected F-Curves as background aid for this Graph Editor instance");
+ uiDefIconButO(block, BUT, "GRAPH_OT_ghost_curves_create", WM_OP_INVOKE_REGION_WIN, ICON_OUTLINER_OB_CURVE, xco,yco,XIC,YIC, "Create snapshot (Ghosts) of selected F-Curves as background aid for this Graph Editor instance");
xco+= XIC;
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index 7ba636302a5..93e3df1c728 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -58,10 +58,10 @@ void graph_header_buttons(const bContext *C, struct ARegion *ar);
/* ***************************************** */
/* graph_select.c */
-void GRAPHEDIT_OT_keyframes_select_all_toggle(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_select_border(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_columnselect(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_clickselect(struct wmOperatorType *ot);
+void GRAPH_OT_select_all_toggle(struct wmOperatorType *ot);
+void GRAPH_OT_select_border(struct wmOperatorType *ot);
+void GRAPH_OT_select_column(struct wmOperatorType *ot);
+void GRAPH_OT_clickselect(struct wmOperatorType *ot);
/* defines for left-right select tool */
enum {
@@ -82,28 +82,28 @@ enum {
/* ***************************************** */
/* graph_edit.c */
-void GRAPHEDIT_OT_previewrange_set(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_view_all(struct wmOperatorType *ot);
+void GRAPH_OT_previewrange_set(struct wmOperatorType *ot);
+void GRAPH_OT_view_all(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_click_insert(struct wmOperatorType *ot);
+void GRAPH_OT_click_insert(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_copy(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_paste(struct wmOperatorType *ot);
+void GRAPH_OT_copy(struct wmOperatorType *ot);
+void GRAPH_OT_paste(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_duplicate(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_delete(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_clean(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_sample(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_bake(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_smooth(struct wmOperatorType *ot);
+void GRAPH_OT_duplicate(struct wmOperatorType *ot);
+void GRAPH_OT_delete(struct wmOperatorType *ot);
+void GRAPH_OT_clean(struct wmOperatorType *ot);
+void GRAPH_OT_sample(struct wmOperatorType *ot);
+void GRAPH_OT_bake(struct wmOperatorType *ot);
+void GRAPH_OT_smooth(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_handletype(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_interpolation_type(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_extrapolation_type(struct wmOperatorType *ot);
+void GRAPH_OT_handletype(struct wmOperatorType *ot);
+void GRAPH_OT_interpolation_type(struct wmOperatorType *ot);
+void GRAPH_OT_extrapolation_type(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_cfrasnap(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_snap(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_keyframes_mirror(struct wmOperatorType *ot);
+void GRAPH_OT_frame_jump(struct wmOperatorType *ot);
+void GRAPH_OT_snap(struct wmOperatorType *ot);
+void GRAPH_OT_mirror(struct wmOperatorType *ot);
/* defines for snap keyframes
* NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h)
@@ -128,16 +128,16 @@ enum {
/* ----------- */
-void GRAPHEDIT_OT_fmodifier_add(struct wmOperatorType *ot);
+void GRAPH_OT_fmodifier_add(struct wmOperatorType *ot);
/* ----------- */
-void GRAPHEDIT_OT_ghost_curves_create(struct wmOperatorType *ot);
-void GRAPHEDIT_OT_ghost_curves_clear(struct wmOperatorType *ot);
+void GRAPH_OT_ghost_curves_create(struct wmOperatorType *ot);
+void GRAPH_OT_ghost_curves_clear(struct wmOperatorType *ot);
/* ***************************************** */
/* graph_buttons.c */
-void GRAPHEDIT_OT_properties(struct wmOperatorType *ot);
+void GRAPH_OT_properties(struct wmOperatorType *ot);
void graph_buttons_register(struct ARegionType *art);
struct bAnimListElem *get_active_fcurve_channel(struct bAnimContext *ac);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index a23f0081c04..f7799023f34 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -58,6 +58,10 @@
#include "WM_api.h"
#include "WM_types.h"
+/* ************************** poll callbacks **********************************/
+
+
+
/* ************************** view-based operators **********************************/
// XXX this probably shouldn't be here..
@@ -80,11 +84,11 @@ static int view_toggle_handles_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_view_togglehandles (wmOperatorType *ot)
+void GRAPH_OT_view_togglehandles (wmOperatorType *ot)
{
/* identification */
ot->name= "Show/Hide All Handles";
- ot->idname= "GRAPHEDIT_OT_handles_view_toggle";
+ ot->idname= "GRAPH_OT_handles_view_toggle";
/* callbacks */
ot->exec= view_toggle_handles_exec;
@@ -96,45 +100,43 @@ void GRAPHEDIT_OT_view_togglehandles (wmOperatorType *ot)
void graphedit_operatortypes(void)
{
/* view */
- WM_operatortype_append(GRAPHEDIT_OT_view_togglehandles);
- WM_operatortype_append(GRAPHEDIT_OT_previewrange_set);
- WM_operatortype_append(GRAPHEDIT_OT_view_all);
- WM_operatortype_append(GRAPHEDIT_OT_properties);
+ WM_operatortype_append(GRAPH_OT_view_togglehandles);
+ WM_operatortype_append(GRAPH_OT_previewrange_set);
+ WM_operatortype_append(GRAPH_OT_view_all);
+ WM_operatortype_append(GRAPH_OT_properties);
- WM_operatortype_append(GRAPHEDIT_OT_ghost_curves_create);
- WM_operatortype_append(GRAPHEDIT_OT_ghost_curves_clear);
+ WM_operatortype_append(GRAPH_OT_ghost_curves_create);
+ WM_operatortype_append(GRAPH_OT_ghost_curves_clear);
/* keyframes */
/* selection */
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_clickselect);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_select_all_toggle);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_select_border);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_columnselect);
+ WM_operatortype_append(GRAPH_OT_clickselect);
+ WM_operatortype_append(GRAPH_OT_select_all_toggle);
+ WM_operatortype_append(GRAPH_OT_select_border);
+ WM_operatortype_append(GRAPH_OT_select_column);
/* editing */
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_snap);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_mirror);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_cfrasnap);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_handletype);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_interpolation_type);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_extrapolation_type);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_sample);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_bake);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_smooth);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_clean);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_delete);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_duplicate);
-
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_copy);
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_paste);
-
- WM_operatortype_append(GRAPHEDIT_OT_keyframes_click_insert);
-
- //TODO: insertkey...
+ WM_operatortype_append(GRAPH_OT_snap);
+ WM_operatortype_append(GRAPH_OT_mirror);
+ WM_operatortype_append(GRAPH_OT_frame_jump);
+ WM_operatortype_append(GRAPH_OT_handletype);
+ WM_operatortype_append(GRAPH_OT_interpolation_type);
+ WM_operatortype_append(GRAPH_OT_extrapolation_type);
+ WM_operatortype_append(GRAPH_OT_sample);
+ WM_operatortype_append(GRAPH_OT_bake);
+ WM_operatortype_append(GRAPH_OT_smooth);
+ WM_operatortype_append(GRAPH_OT_clean);
+ WM_operatortype_append(GRAPH_OT_delete);
+ WM_operatortype_append(GRAPH_OT_duplicate);
+
+ WM_operatortype_append(GRAPH_OT_copy);
+ WM_operatortype_append(GRAPH_OT_paste);
+
+ WM_operatortype_append(GRAPH_OT_click_insert);
/* F-Curve Modifiers */
// XXX temporary?
- WM_operatortype_append(GRAPHEDIT_OT_fmodifier_add);
+ WM_operatortype_append(GRAPH_OT_fmodifier_add);
}
/* ************************** registration - keymaps **********************************/
@@ -144,81 +146,82 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
wmKeymapItem *kmi;
/* view */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
/* graph_select.c - selection tools */
/* click-select */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "column", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
RNA_boolean_set(kmi->ptr, "column", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "left_right", GRAPHKEYS_LRSEL_TEST);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "curves", 1);
- kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
+ kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "curves", 1);
RNA_boolean_set(kmi->ptr, "extend", 1);
/* deselect all */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+ WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
/* borderselect */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
+ WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
/* column select */
// XXX KKEY would be nice to keep for 'keyframe' lines
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, 0, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_KEYS);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_CFRA);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN);
- RNA_enum_set(WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_columnselect", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_KEYS);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_CFRA);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN);
/* graph_edit.c */
/* snap - current frame to selected keys */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_cfrasnap", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ // TODO: maybe since this is called jump, we're better to have it on <something>-J?
+ WM_keymap_add_item(keymap, "GRAPH_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
/* menu + single-step transform */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_handletype", HKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_handletype", HKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
/* destructive */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clean", OKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_smooth", OKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_clean", OKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_smooth", OKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_bake", CKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_bake", CKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_delete", XKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_delete", DELKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_delete", DELKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
/* insertkey */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_click_insert", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_click_insert", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
/* copy/paste */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_copy", CKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_paste", VKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
/* auto-set range */
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
/* F-Curve Modifiers */
// XXX these are temporary? operators...
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
/* transform system */
@@ -233,7 +236,7 @@ void graphedit_keymap(wmWindowManager *wm)
/* keymap for all regions */
keymap= WM_keymap_listbase(wm, "GraphEdit Generic", SPACE_IPO, 0);
- WM_keymap_add_item(keymap, "GRAPHEDIT_OT_properties", NKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0);
/* channels */
/* Channels are not directly handled by the Graph Editor module, but are inherited from the Animation module.
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index a222109b0fe..632ce30863d 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -173,11 +173,11 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_select_all_toggle (wmOperatorType *ot)
+void GRAPH_OT_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
- ot->idname= "GRAPHEDIT_OT_keyframes_select_all_toggle";
+ ot->idname= "GRAPH_OT_select_all_toggle";
/* api callbacks */
ot->exec= graphkeys_deselectall_exec;
@@ -304,11 +304,11 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_select_border(wmOperatorType *ot)
+void GRAPH_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
- ot->idname= "GRAPHEDIT_OT_keyframes_select_border";
+ ot->idname= "GRAPH_OT_select_border";
/* api callbacks */
ot->invoke= WM_border_select_invoke;
@@ -497,11 +497,11 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void GRAPHEDIT_OT_keyframes_columnselect (wmOperatorType *ot)
+void GRAPH_OT_select_column (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
- ot->idname= "GRAPHEDIT_OT_keyframes_columnselect";
+ ot->idname= "GRAPH_OT_select_column";
/* api callbacks */
ot->exec= graphkeys_columnselect_exec;
@@ -908,11 +908,11 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
}
-void GRAPHEDIT_OT_keyframes_clickselect (wmOperatorType *ot)
+void GRAPH_OT_clickselect (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mouse Select Keys";
- ot->idname= "GRAPHEDIT_OT_keyframes_clickselect";
+ ot->idname= "GRAPH_OT_clickselect";
/* api callbacks */
ot->invoke= graphkeys_clickselect_invoke;