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:
authorJoshua Leung <aligorith@gmail.com>2009-07-24 17:41:57 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-24 17:41:57 +0400
commitef6cbc27e05058d9a86e8aafc0e2fb58570b5f8b (patch)
tree70498271d568db240a2d32e113bdc7757be9dbd3 /source/blender/editors/space_time
parent4158913835500e505e722358c2b573e98066bee3 (diff)
Buttons for next/prev keyframes in timeline now work again
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r--source/blender/editors/space_time/time_header.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c
index 84c73c8d8a4..f79e04755e2 100644
--- a/source/blender/editors/space_time/time_header.c
+++ b/source/blender/editors/space_time/time_header.c
@@ -53,6 +53,8 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "RNA_access.h"
+
#include "BIF_gl.h"
#include "BIF_glutil.h"
@@ -362,12 +364,8 @@ static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused)
#define B_TL_PLAY 752
#define B_TL_RPLAY 760
#define B_TL_FF 753
-#define B_TL_PREVKEY 754
-#define B_TL_NEXTKEY 755
#define B_TL_STOP 756
#define B_TL_PREVIEWON 757
-#define B_TL_INSERTKEY 758
-#define B_TL_DELETEKEY 759
#define B_FLIPINFOMENU 0
#define B_NEWFRAME 0
@@ -425,14 +423,6 @@ void do_time_buttons(bContext *C, void *arg, int event)
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
//update_for_newframe();
break;
- case B_TL_PREVKEY:
- /* previous keyframe */
- //nextprev_timeline_key(-1);
- break;
- case B_TL_NEXTKEY:
- /* next keyframe */
- //nextprev_timeline_key(1);
- break;
case B_TL_PREVIEWON:
if (scene->r.psfra) {
@@ -458,6 +448,7 @@ void time_header_buttons(const bContext *C, ARegion *ar)
SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C);
Scene *scene= CTX_data_scene(C);
uiBlock *block;
+ uiBut *but;
int xco, yco= 3;
char *menustr= NULL;
@@ -540,8 +531,9 @@ void time_header_buttons(const bContext *C, ARegion *ar)
uiDefIconBut(block, BUT, B_TL_REW, ICON_REW,
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to Start frame (Shift DownArrow)");
xco+= XIC;
- uiDefIconBut(block, BUT, B_TL_PREVKEY, ICON_PREV_KEYFRAME,
- xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to previous keyframe (Ctrl PageDown)");
+
+ but= uiDefIconButO(block, BUT, "SCREEN_OT_keyframe_jump", WM_OP_INVOKE_REGION_WIN, ICON_PREV_KEYFRAME, xco,yco,XIC,YIC, "Skip to previous keyframe (Ctrl PageDown)");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "next", 0);
xco+= XIC;
if(CTX_wm_screen(C)->animtimer) {
@@ -562,9 +554,10 @@ void time_header_buttons(const bContext *C, ARegion *ar)
}
xco+= XIC;
- uiDefIconBut(block, BUT, B_TL_NEXTKEY, ICON_NEXT_KEYFRAME,
- xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to next keyframe (Ctrl PageUp)");
+ but= uiDefIconButO(block, BUT, "SCREEN_OT_keyframe_jump", WM_OP_INVOKE_REGION_WIN, ICON_NEXT_KEYFRAME, xco,yco,XIC,YIC, "Skip to next keyframe (Ctrl PageUp)");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "next", 1);
xco+= XIC;
+
uiDefIconBut(block, BUT, B_TL_FF, ICON_FF,
xco, yco, XIC, YIC, 0, 0, 0, 0, 0, "Skip to End frame (Shift UpArrow)");
uiBlockEndAlign(block);