diff options
Diffstat (limited to 'source/blender/editors/space_outliner')
4 files changed, 50 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index fbc475d3bdd..11d8cf50d4b 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -64,6 +64,7 @@ #include "IMB_imbuf_types.h" +#include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_context.h" #include "BKE_deform.h" @@ -3086,6 +3087,45 @@ void outliner_operation_menu(Scene *scene, ARegion *ar, SpaceOops *soops) } } +/* ***************** KEYINGSET OPERATIONS *************** */ + +/* These operators are only available in databrowser mode for now, as + * they depend on having RNA paths and/or hierarchies available. + */ + +/* find the 'active' KeyingSet, and add if not found (if adding is allowed) */ +// TODO: should this be an API func? +static KeyingSet *verify_active_keyingset(Scene *scene, short add) +{ + KeyingSet *ks= NULL; + + /* try to find one from scene */ + if (scene->active_keyingset > 0) + ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1); + + /* add if none found */ + // XXX the default settings have yet to evolve + if ((add) && (ks==NULL)) + ks= BKE_keyingset_add(&scene->keyingsets, "KeyingSet", KEYINGSET_ABSOLUTE, 0); + + return ks; +} + +/* ---------------------------------- */ + + +void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot) +{ + +} + + +/* ---------------------------------- */ + +void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot) +{ + +} /* ***************** DRAW *************** */ diff --git a/source/blender/editors/space_outliner/outliner_header.c b/source/blender/editors/space_outliner/outliner_header.c index 2c114f3099b..7add3f85ea0 100644 --- a/source/blender/editors/space_outliner/outliner_header.c +++ b/source/blender/editors/space_outliner/outliner_header.c @@ -44,6 +44,7 @@ #include "BKE_main.h" #include "BKE_screen.h" +#include "ED_keyframing.h" #include "ED_screen.h" #include "ED_util.h" #include "ED_types.h" diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index e7e75833d43..067c14dc257 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -119,6 +119,8 @@ void outliner_select(struct SpaceOops *soops, struct ListBase *lb, int *index, s void draw_outliner(const struct bContext *C); void OUTLINER_OT_activate_click(struct wmOperatorType *ot); +void OUTLINER_OT_keyingset_add_selected(struct wmOperatorType *ot); +void OUTLINER_OT_keyingset_remove_selected(struct wmOperatorType *ot); #if 0 extern void outliner_mouse_event(Scene *scene, ARegion *ar, SpaceOops *soops, short event); diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 7d1155cb5d7..295d7ade97c 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -44,6 +44,9 @@ void outliner_operatortypes(void) { WM_operatortype_append(OUTLINER_OT_activate_click); + + WM_operatortype_append(OUTLINER_OT_keyingset_add_selected); + WM_operatortype_append(OUTLINER_OT_keyingset_remove_selected); } void outliner_keymap(wmWindowManager *wm) @@ -51,6 +54,10 @@ void outliner_keymap(wmWindowManager *wm) ListBase *keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OOPS, 0); WM_keymap_verify_item(keymap, "OUTLINER_OT_activate_click", LEFTMOUSE, KM_PRESS, 0, 0); + + /* keying sets - only for databrowse */ + WM_keymap_verify_item(keymap, "OUTLINER_OT_keyingset_add_selected", KKEY, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "OUTLINER_OT_keyingset_remove_selected", KKEY, KM_PRESS, KM_ALT, 0); } |