diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-16 06:01:56 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-16 06:01:56 +0300 |
commit | 7f4fa8971a69141c3478109b283241d6ba5144f9 (patch) | |
tree | 76f38dbe5f6551253569bf655a18dd4bfb9e75c1 /source/blender/editors/space_time | |
parent | b2c04faa064527ddbe2618b07dff063187a77688 (diff) |
2.5: Restoring Auto-Keyframing for Transforms
Auto-Keyframing does not work anywhere else yet, and probably won't for a while.
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r-- | source/blender/editors/space_time/time_header.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c index 8e61bb7ff4b..b796e207266 100644 --- a/source/blender/editors/space_time/time_header.c +++ b/source/blender/editors/space_time/time_header.c @@ -34,6 +34,7 @@ #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_userdef_types.h" #include "MEM_guardedalloc.h" @@ -352,7 +353,6 @@ static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused) #define B_FLIPINFOMENU 0 #define B_NEWFRAME 0 -#define AUTOKEY_ON 0 #define B_DIFF 0 @@ -528,16 +528,18 @@ void time_header_buttons(const bContext *C, ARegion *ar) xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to End frame (Shift UpArrow)"); xco+= XIC+8; - uiDefIconButBitS(block, TOG, AUTOKEY_ON, REDRAWINFO, ICON_REC, - xco, yco, XIC, YIC, &(scene->autokey_mode), 0, 0, 0, 0, "Automatic keyframe insertion for Objects and Bones"); - xco+= XIC; - if (scene->autokey_mode & AUTOKEY_ON) { - uiDefButS(block, MENU, REDRAWINFO, - "Auto-Keying Mode %t|Add/Replace Keys%x3|Replace Keys %x5", - xco, yco, (int)3.5*XIC, YIC, &(scene->autokey_mode), 0, 1, 0, 0, - "Mode of automatic keyframe insertion for Objects and Bones"); - xco+= (4*XIC); - } + uiBlockBeginAlign(block); + uiDefIconButBitS(block, TOG, AUTOKEY_ON, REDRAWINFO, ICON_REC, + xco, yco, XIC, YIC, &(scene->autokey_mode), 0, 0, 0, 0, "Automatic keyframe insertion for Objects and Bones"); + xco+= XIC; + if (IS_AUTOKEY_ON(scene)) { + uiDefButS(block, MENU, REDRAWINFO, + "Auto-Keying Mode %t|Add/Replace Keys%x3|Replace Keys %x5", + xco, yco, (int)5.5*XIC, YIC, &(scene->autokey_mode), 0, 1, 0, 0, + "Mode of automatic keyframe insertion for Objects and Bones"); + xco+= (6*XIC); + } + uiBlockEndAlign(block); xco+= 16; @@ -550,10 +552,10 @@ void time_header_buttons(const bContext *C, ARegion *ar) MEM_freeN(menustr); xco+= (6*XIC); - uiDefIconButO(block, BUT, "ANIM_OT_delete_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_DEHLT, xco,yco,XIC,YIC, "Delete Keyframes for the Active Keying Set (Alt-I)"); - xco+= XIC+4; - uiDefIconButO(block, BUT, "ANIM_OT_insert_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_HLT, xco,yco,XIC,YIC, "Insert Keyframes for the Active Keying Set (I)"); - xco+= XIC+4; + uiBlockBeginAlign(block); + uiDefIconButO(block, BUT, "ANIM_OT_delete_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_DEHLT, xco,yco,XIC,YIC, "Delete Keyframes for the Active Keying Set (Alt-I)"); + uiDefIconButO(block, BUT, "ANIM_OT_insert_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_HLT, xco,yco,XIC,YIC, "Insert Keyframes for the Active Keying Set (I)"); + uiBlockEndAlign(block); xco+= 16; |