NLA SoC: DopeSheet Cleanups
* Replaced old-style menu defines with the new-style Layout Engine ones. These are now much cleaner as a result :) * Wrapped DopeSheet and Graph Editors in RNA to allow them to use the new Layout Engine for menu drawing * Shortened the names of operators in the DopeSheet, removing the "keyframes" prefix since that's the only real context which can operate there. * Standardised a few names, and renamed a confusingly named operator (cfrasnap -> jump to frame)
This commit is contained in:
@@ -142,7 +142,6 @@ typedef enum eAnim_KeyType {
|
||||
ALE_GPFRAME, /* Grease Pencil Frames */
|
||||
ALE_NLASTRIP, /* NLA Strips */
|
||||
|
||||
// XXX the following are for summaries... should these be kept?
|
||||
ALE_SCE, /* Scene summary */
|
||||
ALE_OB, /* Object summary */
|
||||
ALE_ACT, /* Action summary */
|
||||
@@ -311,7 +310,7 @@ void ipo_rainbow(int cur, int tot, float *out);
|
||||
/* ------------- NLA-Mapping ----------------------- */
|
||||
/* anim_draw.c */
|
||||
|
||||
// XXX these are soon to be depreceated?
|
||||
// XXX these need attention for the new editing method...
|
||||
|
||||
/* Obtain the Object providing NLA-scaling for the given channel if applicable */
|
||||
struct Object *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale);
|
||||
|
||||
@@ -307,11 +307,11 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_copy (wmOperatorType *ot)
|
||||
void ACT_OT_copy (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Copy Keyframes";
|
||||
ot->idname= "ACT_OT_keyframes_copy";
|
||||
ot->idname= "ACT_OT_copy";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= actkeys_copy_exec;
|
||||
@@ -351,11 +351,11 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_paste (wmOperatorType *ot)
|
||||
void ACT_OT_paste (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Paste Keyframes";
|
||||
ot->idname= "ACT_OT_keyframes_paste";
|
||||
ot->idname= "ACT_OT_paste";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= actkeys_paste_exec;
|
||||
@@ -447,11 +447,11 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_insert (wmOperatorType *ot)
|
||||
void ACT_OT_insert (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Insert Keyframes";
|
||||
ot->idname= "ACT_OT_keyframes_insert";
|
||||
ot->idname= "ACT_OT_insert";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
@@ -524,11 +524,11 @@ static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_duplicate (wmOperatorType *ot)
|
||||
void ACT_OT_duplicate (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Duplicate Keyframes";
|
||||
ot->idname= "ACT_OT_keyframes_duplicate";
|
||||
ot->idname= "ACT_OT_duplicate";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= actkeys_duplicate_invoke;
|
||||
@@ -591,11 +591,11 @@ static int actkeys_delete_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_delete (wmOperatorType *ot)
|
||||
void ACT_OT_delete (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Delete Keyframes";
|
||||
ot->idname= "ACT_OT_keyframes_delete";
|
||||
ot->idname= "ACT_OT_delete";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_operator_confirm;
|
||||
@@ -654,11 +654,11 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_clean (wmOperatorType *ot)
|
||||
void ACT_OT_clean (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Clean Keyframes";
|
||||
ot->idname= "ACT_OT_keyframes_clean";
|
||||
ot->idname= "ACT_OT_clean";
|
||||
|
||||
/* api callbacks */
|
||||
//ot->invoke= // XXX we need that number popup for this!
|
||||
@@ -778,11 +778,11 @@ static int actkeys_sample_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_sample (wmOperatorType *ot)
|
||||
void ACT_OT_sample (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Sample Keyframes";
|
||||
ot->idname= "ACT_OT_keyframes_sample";
|
||||
ot->idname= "ACT_OT_sample";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= actkeys_sample_exec;
|
||||
@@ -853,11 +853,11 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_extrapolation_type_set (wmOperatorType *ot)
|
||||
void ACT_OT_extrapolation_type_set (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Set Keyframe Extrapolation";
|
||||
ot->idname= "ACT_OT_keyframes_extrapolation_type_set";
|
||||
ot->idname= "ACT_OT_extrapolation_type_set";
|
||||
|
||||
/* 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_keyframes_interpolation_type (wmOperatorType *ot)
|
||||
void ACT_OT_interpolation_type_set (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Set Keyframe Interpolation";
|
||||
ot->idname= "ACT_OT_keyframes_interpolation_type";
|
||||
ot->idname= "ACT_OT_interpolation_type_set";
|
||||
|
||||
/* 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_keyframes_handle_type_set (wmOperatorType *ot)
|
||||
void ACT_OT_handle_type_set (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Set Keyframe Handle Type";
|
||||
ot->idname= "ACT_OT_keyframes_handle_type_set";
|
||||
ot->idname= "ACT_OT_handle_type_set";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
@@ -1032,10 +1032,10 @@ void ACT_OT_keyframes_handle_type_set (wmOperatorType *ot)
|
||||
/* ************************************************************************** */
|
||||
/* TRANSFORM STUFF */
|
||||
|
||||
/* ***************** Snap Current Frame Operator *********************** */
|
||||
/* ***************** Jump to Selected Frames Operator *********************** */
|
||||
|
||||
/* snap current-frame indicator to 'average time' of selected keyframe */
|
||||
static int actkeys_cfrasnap_exec(bContext *C, wmOperator *op)
|
||||
static int actkeys_framejump_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
bAnimContext ac;
|
||||
ListBase anim_data= {NULL, NULL};
|
||||
@@ -1071,14 +1071,14 @@ static int actkeys_cfrasnap_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_cfrasnap (wmOperatorType *ot)
|
||||
void ACT_OT_frame_jump (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Snap Current Frame to Keys";
|
||||
ot->idname= "ACT_OT_keyframes_cfrasnap";
|
||||
ot->name= "Jump to Frame";
|
||||
ot->idname= "ACT_OT_frame_jump";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= actkeys_cfrasnap_exec;
|
||||
ot->exec= actkeys_framejump_exec;
|
||||
ot->poll= ED_operator_action_active;
|
||||
|
||||
/* flags */
|
||||
@@ -1166,11 +1166,11 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_snap (wmOperatorType *ot)
|
||||
void ACT_OT_snap (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Snap Keys";
|
||||
ot->idname= "ACT_OT_keyframes_snap";
|
||||
ot->idname= "ACT_OT_snap";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
@@ -1282,11 +1282,11 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_mirror (wmOperatorType *ot)
|
||||
void ACT_OT_mirror (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Mirror Keys";
|
||||
ot->idname= "ACT_OT_keyframes_mirror";
|
||||
ot->idname= "ACT_OT_mirror";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -53,10 +53,10 @@ void action_header_buttons(const struct bContext *C, struct ARegion *ar);
|
||||
/* ***************************************** */
|
||||
/* action_select.c */
|
||||
|
||||
void ACT_OT_keyframes_select_all_toggle(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_select_border(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_select_column(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_clickselect(struct wmOperatorType *ot);
|
||||
void ACT_OT_select_all_toggle(struct wmOperatorType *ot);
|
||||
void ACT_OT_select_border(struct wmOperatorType *ot);
|
||||
void ACT_OT_select_column(struct wmOperatorType *ot);
|
||||
void ACT_OT_clickselect(struct wmOperatorType *ot);
|
||||
|
||||
/* defines for left-right select tool */
|
||||
enum {
|
||||
@@ -80,22 +80,23 @@ enum {
|
||||
void ACT_OT_previewrange_set(struct wmOperatorType *ot);
|
||||
void ACT_OT_view_all(struct wmOperatorType *ot);
|
||||
|
||||
void ACT_OT_keyframes_copy(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_paste(struct wmOperatorType *ot);
|
||||
void ACT_OT_copy(struct wmOperatorType *ot);
|
||||
void ACT_OT_paste(struct wmOperatorType *ot);
|
||||
|
||||
void ACT_OT_keyframes_insert(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_duplicate(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_delete(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_clean(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_sample(struct wmOperatorType *ot);
|
||||
void ACT_OT_insert(struct wmOperatorType *ot);
|
||||
void ACT_OT_duplicate(struct wmOperatorType *ot);
|
||||
void ACT_OT_delete(struct wmOperatorType *ot);
|
||||
void ACT_OT_clean(struct wmOperatorType *ot);
|
||||
void ACT_OT_sample(struct wmOperatorType *ot);
|
||||
|
||||
void ACT_OT_keyframes_handle_type_set(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_interpolation_type(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_extrapolation_type_set(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_keyframes_cfrasnap(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_snap(struct wmOperatorType *ot);
|
||||
void ACT_OT_keyframes_mirror(struct wmOperatorType *ot);
|
||||
void ACT_OT_frame_jump(struct wmOperatorType *ot);
|
||||
|
||||
void ACT_OT_snap(struct wmOperatorType *ot);
|
||||
void ACT_OT_mirror(struct wmOperatorType *ot);
|
||||
|
||||
/* defines for snap keyframes
|
||||
* NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h)
|
||||
|
||||
@@ -63,25 +63,25 @@ void action_operatortypes(void)
|
||||
{
|
||||
/* keyframes */
|
||||
/* selection */
|
||||
WM_operatortype_append(ACT_OT_keyframes_clickselect);
|
||||
WM_operatortype_append(ACT_OT_keyframes_select_all_toggle);
|
||||
WM_operatortype_append(ACT_OT_keyframes_select_border);
|
||||
WM_operatortype_append(ACT_OT_keyframes_select_column);
|
||||
WM_operatortype_append(ACT_OT_clickselect);
|
||||
WM_operatortype_append(ACT_OT_select_all_toggle);
|
||||
WM_operatortype_append(ACT_OT_select_border);
|
||||
WM_operatortype_append(ACT_OT_select_column);
|
||||
|
||||
/* editing */
|
||||
WM_operatortype_append(ACT_OT_keyframes_snap);
|
||||
WM_operatortype_append(ACT_OT_keyframes_mirror);
|
||||
WM_operatortype_append(ACT_OT_keyframes_cfrasnap);
|
||||
WM_operatortype_append(ACT_OT_keyframes_handle_type_set);
|
||||
WM_operatortype_append(ACT_OT_keyframes_interpolation_type);
|
||||
WM_operatortype_append(ACT_OT_keyframes_extrapolation_type_set);
|
||||
WM_operatortype_append(ACT_OT_keyframes_sample);
|
||||
WM_operatortype_append(ACT_OT_keyframes_clean);
|
||||
WM_operatortype_append(ACT_OT_keyframes_delete);
|
||||
WM_operatortype_append(ACT_OT_keyframes_duplicate);
|
||||
WM_operatortype_append(ACT_OT_keyframes_insert);
|
||||
WM_operatortype_append(ACT_OT_keyframes_copy);
|
||||
WM_operatortype_append(ACT_OT_keyframes_paste);
|
||||
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_sample);
|
||||
WM_operatortype_append(ACT_OT_clean);
|
||||
WM_operatortype_append(ACT_OT_delete);
|
||||
WM_operatortype_append(ACT_OT_duplicate);
|
||||
WM_operatortype_append(ACT_OT_insert);
|
||||
WM_operatortype_append(ACT_OT_copy);
|
||||
WM_operatortype_append(ACT_OT_paste);
|
||||
|
||||
WM_operatortype_append(ACT_OT_previewrange_set);
|
||||
WM_operatortype_append(ACT_OT_view_all);
|
||||
@@ -95,57 +95,58 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
|
||||
|
||||
/* action_select.c - selection tools */
|
||||
/* click-select */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
|
||||
kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
|
||||
kmi= WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
|
||||
RNA_boolean_set(kmi->ptr, "column", 1);
|
||||
kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
|
||||
kmi= WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
|
||||
RNA_boolean_set(kmi->ptr, "extend", 1);
|
||||
kmi= WM_keymap_add_item(keymap, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
|
||||
kmi= WM_keymap_add_item(keymap, "ACT_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, "ACT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
|
||||
kmi= WM_keymap_add_item(keymap, "ACT_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
|
||||
RNA_enum_set(kmi->ptr, "left_right", ACTKEYS_LRSEL_TEST);
|
||||
|
||||
/* deselect all */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_all_toggle", AKEY, KM_PRESS, 0, 0);
|
||||
RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
|
||||
RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
|
||||
|
||||
/* borderselect */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_border", BKEY, KM_PRESS, 0, 0);
|
||||
RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_select_border", BKEY, KM_PRESS, 0, 0);
|
||||
RNA_boolean_set(WM_keymap_add_item(keymap, "ACT_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
|
||||
|
||||
/* column select */
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS);
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_CFRA);
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_COLUMN);
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_keyframes_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_BETWEEN);
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS);
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_CFRA);
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_COLUMN);
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "ACT_OT_select_column", KKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_MARKERS_BETWEEN);
|
||||
|
||||
/* action_edit.c */
|
||||
/* snap - current frame to selected keys */
|
||||
WM_keymap_add_item(keymap, "ACT_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, "ACT_OT_frame_jump", SKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
|
||||
|
||||
/* menu + single-step transform */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
|
||||
/* menu + set setting */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_handle_type_set", HKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_extrapolation_type_set", EKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
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);
|
||||
|
||||
/* destructive */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_clean", OKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_clean", OKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_sample", OKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_delete", XKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_delete", DELKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_delete", XKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_delete", DELKEY, KM_PRESS, 0, 0);
|
||||
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_insert", IKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_insert", IKEY, KM_PRESS, 0, 0);
|
||||
|
||||
/* copy/paste */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_copy", CKEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_keyframes_paste", VKEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "ACT_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
|
||||
|
||||
/* auto-set range */
|
||||
WM_keymap_add_item(keymap, "ACT_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
|
||||
|
||||
@@ -179,11 +179,11 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_select_all_toggle (wmOperatorType *ot)
|
||||
void ACT_OT_select_all_toggle (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Select All";
|
||||
ot->idname= "ACT_OT_keyframes_select_all_toggle";
|
||||
ot->idname= "ACT_OT_select_all_toggle";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= actkeys_deselectall_exec;
|
||||
@@ -338,11 +338,11 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_select_border(wmOperatorType *ot)
|
||||
void ACT_OT_select_border(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Border Select";
|
||||
ot->idname= "ACT_OT_keyframes_select_border";
|
||||
ot->idname= "ACT_OT_select_border";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_border_select_invoke;
|
||||
@@ -555,11 +555,11 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_select_column (wmOperatorType *ot)
|
||||
void ACT_OT_select_column (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Select All";
|
||||
ot->idname= "ACT_OT_keyframes_select_column";
|
||||
ot->idname= "ACT_OT_select_column";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= actkeys_columnselect_exec;
|
||||
@@ -960,11 +960,11 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
|
||||
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
|
||||
}
|
||||
|
||||
void ACT_OT_keyframes_clickselect (wmOperatorType *ot)
|
||||
void ACT_OT_clickselect (wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Mouse Select Keys";
|
||||
ot->idname= "ACT_OT_keyframes_clickselect";
|
||||
ot->idname= "ACT_OT_clickselect";
|
||||
|
||||
/* api callbacks - absolutely no exec() this yet... */
|
||||
ot->invoke= actkeys_clickselect_invoke;
|
||||
|
||||
@@ -110,6 +110,11 @@ static void nla_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
|
||||
uiItemS(layout);
|
||||
|
||||
uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_set");
|
||||
uiItemO(layout, NULL, 0, "ANIM_OT_previewrange_clear");
|
||||
|
||||
uiItemS(layout);
|
||||
|
||||
//uiItemO(layout, NULL, 0, "NLA_OT_view_all");
|
||||
|
||||
if (sa->full)
|
||||
|
||||
@@ -366,6 +366,8 @@ extern StructRNA RNA_SoundSequence;
|
||||
extern StructRNA RNA_Space;
|
||||
extern StructRNA RNA_Space3DView;
|
||||
extern StructRNA RNA_SpaceButtonsWindow;
|
||||
extern StructRNA RNA_SpaceDopeSheetEditor;
|
||||
extern StructRNA RNA_SpaceGraphEditor;
|
||||
extern StructRNA RNA_SpaceImageEditor;
|
||||
extern StructRNA RNA_SpaceNLA;
|
||||
extern StructRNA RNA_SpaceOutliner;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "rna_internal.h"
|
||||
|
||||
#include "DNA_action_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_space_types.h"
|
||||
#include "DNA_view3d_types.h"
|
||||
@@ -89,9 +90,8 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
|
||||
switch(space->spacetype) {
|
||||
case SPACE_VIEW3D:
|
||||
return &RNA_Space3DView;
|
||||
/*case SPACE_IPO:
|
||||
case SPACE_IPO:
|
||||
return &RNA_SpaceGraphEditor;
|
||||
*/
|
||||
case SPACE_OUTLINER:
|
||||
return &RNA_SpaceOutliner;
|
||||
case SPACE_BUTS:
|
||||
@@ -109,9 +109,9 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
|
||||
//case SPACE_IMASEL:
|
||||
// return &RNA_SpaceImageBrowser;
|
||||
/*case SPACE_SOUND:
|
||||
return &RNA_SpaceAudioWindow;
|
||||
return &RNA_SpaceAudioWindow;*/
|
||||
case SPACE_ACTION:
|
||||
return &RNA_SpaceDopeSheetEditor;*/
|
||||
return &RNA_SpaceDopeSheetEditor;
|
||||
case SPACE_NLA:
|
||||
return &RNA_SpaceNLA;
|
||||
/*case SPACE_SCRIPT:
|
||||
@@ -868,6 +868,94 @@ static void rna_def_space_text(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool.");
|
||||
}
|
||||
|
||||
static void rna_def_space_dopesheet(BlenderRNA *brna)
|
||||
{
|
||||
StructRNA *srna;
|
||||
PropertyRNA *prop;
|
||||
|
||||
static EnumPropertyItem mode_items[] = {
|
||||
{SACTCONT_DOPESHEET, "DOPESHEET", 0, "DopeSheet", ""},
|
||||
{SACTCONT_ACTION, "ACTION", 0, "Action Editor", ""},
|
||||
{SACTCONT_SHAPEKEY, "SHAPEKEY", 0, "ShapeKey Editor", ""}, // XXX to be depreceated?
|
||||
{SACTCONT_GPENCIL, "GPENCIL", 0, "Grease Pencil", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
|
||||
srna= RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
|
||||
RNA_def_struct_sdna(srna, "SpaceAction");
|
||||
RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data.");
|
||||
|
||||
/* mode */
|
||||
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode");
|
||||
RNA_def_property_enum_items(prop, mode_items);
|
||||
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
|
||||
|
||||
/* display */
|
||||
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
|
||||
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
|
||||
|
||||
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM);
|
||||
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
|
||||
|
||||
prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS);
|
||||
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
|
||||
|
||||
/* editing */
|
||||
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
|
||||
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
|
||||
|
||||
// TODO... autosnap, dopesheet?
|
||||
}
|
||||
|
||||
static void rna_def_space_graph(BlenderRNA *brna)
|
||||
{
|
||||
StructRNA *srna;
|
||||
PropertyRNA *prop;
|
||||
|
||||
static EnumPropertyItem mode_items[] = {
|
||||
{SIPO_MODE_ANIMATION, "FCURVES", 0, "F-Curves", ""},
|
||||
{SIPO_MODE_DRIVERS, "DRIVERS", 0, "Drivers", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
|
||||
srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space");
|
||||
RNA_def_struct_sdna(srna, "SpaceIpo");
|
||||
RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data.");
|
||||
|
||||
/* mode */
|
||||
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode");
|
||||
RNA_def_property_enum_items(prop, mode_items);
|
||||
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
|
||||
|
||||
/* display */
|
||||
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
|
||||
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
|
||||
|
||||
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
|
||||
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
|
||||
|
||||
prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
|
||||
RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
|
||||
|
||||
/* editing */
|
||||
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
|
||||
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
|
||||
|
||||
// TODO... autosnap, dopesheet?
|
||||
}
|
||||
|
||||
static void rna_def_space_nla(BlenderRNA *brna)
|
||||
{
|
||||
StructRNA *srna;
|
||||
@@ -886,7 +974,9 @@ static void rna_def_space_nla(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM);
|
||||
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
|
||||
|
||||
|
||||
/* editing */
|
||||
// TODO... autosnap, dopesheet?
|
||||
}
|
||||
|
||||
void RNA_def_space(BlenderRNA *brna)
|
||||
@@ -899,6 +989,8 @@ void RNA_def_space(BlenderRNA *brna)
|
||||
rna_def_background_image(brna);
|
||||
rna_def_space_3dview(brna);
|
||||
rna_def_space_buttons(brna);
|
||||
rna_def_space_dopesheet(brna);
|
||||
rna_def_space_graph(brna);
|
||||
rna_def_space_nla(brna);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user