From 7d3c88772b4cdf9cec8966390e84bdd21802395f Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 11 Feb 2009 12:19:42 +0000 Subject: Keying Sets: Initial commit of skeleton code When fully implemented, these will be the clearest demonstration of 'Everything is Animateable', as they will allow users to define an arbitary group of settings through selecting items in the Datablocks (RNA-Viewer) View of the Outliner to define custom 'sets'. Such Keying Sets are known as the 'absolute' ones, which are created for a custom purpose. Of course, 'builtin' Keying Sets will still be provided. Such built-in ones will not work on any particular paths, but will use context info to maintain the legacy method of inserting keyframes (via IKEY menu). Currently, KeyingSets cannot be created/edited through the UI, though the backend code is in place to do this. --- source/blender/editors/space_time/time_header.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_time') diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c index 65946a4288b..1f03530b680 100644 --- a/source/blender/editors/space_time/time_header.c +++ b/source/blender/editors/space_time/time_header.c @@ -43,6 +43,7 @@ #include "BKE_global.h" #include "BKE_screen.h" +#include "ED_keyframing.h" #include "ED_screen.h" #include "ED_types.h" #include "ED_util.h" @@ -429,6 +430,7 @@ void time_header_buttons(const bContext *C, ARegion *ar) Scene *scene= CTX_data_scene(C); uiBlock *block; int xco, yco= 3; + char *menustr= NULL; block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV); uiBlockSetHandleFunc(block, do_time_buttons, NULL); @@ -539,12 +541,21 @@ void time_header_buttons(const bContext *C, ARegion *ar) xco+= 16; - uiDefIconBut(block, BUT, B_TL_INSERTKEY, ICON_KEY_HLT, - xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Insert Keyframe for the context of the largest area (IKEY)"); - xco+= XIC+4; + + menustr= ANIM_build_keyingsets_menu(&scene->keyingsets); + uiDefButI(block, MENU, B_DIFF, + menustr, + xco, yco, (int)5.5*XIC, YIC, &(scene->active_keyingset), 0, 1, 0, 0, + "Active Keying Set (i.e. set of channels to Insert Keyframes for)"); + MEM_freeN(menustr); + xco+= (6*XIC); + uiDefIconBut(block, BUT, B_TL_DELETEKEY, ICON_KEY_DEHLT, xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Delete Keyframe for the context of the largest area (ALTKEY-IKEY)"); xco+= XIC+4; + uiDefIconBut(block, BUT, B_TL_INSERTKEY, ICON_KEY_HLT, + xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Insert Keyframe for the context of the largest area (IKEY)"); + xco+= XIC+4; xco+= 16; -- cgit v1.2.3