diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 8060a91653a..b60b798014d 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -96,6 +96,8 @@ - anim settings, audio */ +/* prototypes */ +void playback_anim(void); /* ************************ SOUND *************************** */ static void load_new_sample(char *str) /* called from fileselect */ @@ -477,11 +479,32 @@ static void run_playanim(char *file) { system(str); } +void playback_anim(void) +{ + char file[FILE_MAXDIR+FILE_MAXFILE]; + +#ifdef WITH_QUICKTIME + if(G.scene->r.imtype == R_QUICKTIME) + makeqtstring(file); + else +#endif + makeavistring(file); + if(BLI_exist(file)) { + run_playanim(file); + } + else { + makepicstring(file, G.scene->r.sfra); + if(BLI_exist(file)) { + run_playanim(file); + } + else error("Can't find image: %s", file); + } +} + void do_render_panels(unsigned short event) { ScrArea *sa; ID *id; - char file[FILE_MAXDIR+FILE_MAXFILE]; switch(event) { @@ -497,22 +520,7 @@ void do_render_panels(unsigned short event) allqueue(REDRAWBUTSSCENE, 0); break; case B_PLAYANIM: -#ifdef WITH_QUICKTIME - if(G.scene->r.imtype == R_QUICKTIME) - makeqtstring(file); - else -#endif - makeavistring(file); - if(BLI_exist(file)) { - run_playanim(file); - } - else { - makepicstring(file, G.scene->r.sfra); - if(BLI_exist(file)) { - run_playanim(file); - } - else error("Can't find image: %s", file); - } + playback_anim(); break; case B_DOANIM: diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index 1f1aaeb84c1..e2bb0fc4f9d 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -1464,8 +1464,7 @@ static void do_info_rendermenu(void *arg, int event) { char file[FILE_MAXDIR+FILE_MAXFILE]; - extern void makeavistring(char *string); - extern void makeqtstring (char *string); + extern void playback_anim(); switch(event) { @@ -1483,22 +1482,7 @@ static void do_info_rendermenu(void *arg, int event) BIF_toggle_render_display(); break; case 5: -#ifdef WITH_QUICKTIME - if(G.scene->r.imtype == R_QUICKTIME) - makeqtstring(file); - else -#endif - makeavistring(file); - if(BLI_exist(file)) { - run_playanim(file); - } - else { - makepicstring(file, G.scene->r.sfra); - if(BLI_exist(file)) { - run_playanim(file); - } - else error("Can't find image: %s", file); - } + playback_anim(); break; case 6: /* dodgy hack turning on SHIFT key to do a proper render border select diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index eefdffea78b..4d6e1c953f5 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -520,6 +520,7 @@ int blenderqread(unsigned short event, short val) /* here do the general keys handling (not screen/window/space) */ /* return 0: do not pass on to the other queues */ extern int textediting; + extern void playback_anim(); ScrArea *sa; Object *ob; int textspace=0; @@ -655,6 +656,9 @@ int blenderqread(unsigned short event, short val) newspace(curarea, SPACE_TEXT); return 0; } + else if (G.qual==LR_CTRLKEY) { + playback_anim(); + } else if(G.qual==0) { BIF_toggle_render_display(); return 0; @@ -669,6 +673,9 @@ int blenderqread(unsigned short event, short val) newspace(curarea, SPACE_NLA); return 0; } + else if (G.qual==LR_CTRLKEY) { + BIF_do_render(1); + } else { /* ctrl/alt + f12 should render too, for some macs have f12 assigned to cd eject */ BIF_do_render(0);