forked from bartvdbraak/blender
Added Dump 3dView and Dump Screen to the File menu
with their shortcuts. Kent
This commit is contained in:
parent
aa318f0bcc
commit
98a012865b
@ -127,7 +127,7 @@ void add_numbut (int nr, int type, char *str, float min, float max, void *poin,
|
|||||||
void clever_numbuts (void);
|
void clever_numbuts (void);
|
||||||
void replace_names_but (void);
|
void replace_names_but (void);
|
||||||
|
|
||||||
void BIF_screendump(void);
|
void BIF_screendump(int fscreen);
|
||||||
void write_screendump(char *name);
|
void write_screendump(char *name);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -851,7 +851,7 @@ unsigned short extern_qread_ext(short *val, char *ascii)
|
|||||||
else if(event==INPUTCHANGE) ext_inputchange= *val;
|
else if(event==INPUTCHANGE) ext_inputchange= *val;
|
||||||
else if(event==MOUSEY || event==MOUSEX) ext_mousemove= 1;
|
else if(event==MOUSEY || event==MOUSEX) ext_mousemove= 1;
|
||||||
else if((G.qual & (LR_CTRLKEY|LR_ALTKEY)) && event==F3KEY) {
|
else if((G.qual & (LR_CTRLKEY|LR_ALTKEY)) && event==F3KEY) {
|
||||||
if(*val) BIF_screendump();
|
if(*val) BIF_screendump(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
|
@ -868,6 +868,12 @@ static void do_info_filemenu(void *arg, int event)
|
|||||||
case 23: /* save dynamic runtime */
|
case 23: /* save dynamic runtime */
|
||||||
activate_fileselect(FILE_SPECIAL, "Save Dynamic Runtime", "", write_runtime_check_dynamic);
|
activate_fileselect(FILE_SPECIAL, "Save Dynamic Runtime", "", write_runtime_check_dynamic);
|
||||||
break;
|
break;
|
||||||
|
case 24:
|
||||||
|
BIF_screendump(0);
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
BIF_screendump(1);
|
||||||
|
break;
|
||||||
case 10: /* pack data */
|
case 10: /* pack data */
|
||||||
check_packAll();
|
check_packAll();
|
||||||
break;
|
break;
|
||||||
@ -933,6 +939,8 @@ static uiBlock *info_filemenu(void *arg_unused)
|
|||||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Image...|F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Image...|F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
|
||||||
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Dump 3DView|Ctrl F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 24, "");
|
||||||
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Dump Screen|Ctrl Shift F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 25, "");
|
||||||
#if GAMEBLENDER == 1
|
#if GAMEBLENDER == 1
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Runtime...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 22, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Runtime...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 22, "");
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -943,6 +951,7 @@ static uiBlock *info_filemenu(void *arg_unused)
|
|||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Default Settings|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 31, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Default Settings|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 31, "");
|
||||||
|
|
||||||
|
|
||||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append...|Shift F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append...|Shift F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
||||||
|
@ -113,7 +113,7 @@ void write_screendump(char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get dump from frontbuffer */
|
/* get dump from frontbuffer */
|
||||||
void BIF_screendump(void)
|
void BIF_screendump(int fscreen)
|
||||||
{
|
{
|
||||||
extern uiBut *UIbuttip; // interface.c
|
extern uiBut *UIbuttip; // interface.c
|
||||||
static int wasmenu= 0;
|
static int wasmenu= 0;
|
||||||
@ -133,7 +133,7 @@ void BIF_screendump(void)
|
|||||||
if(dumprect) MEM_freeN(dumprect);
|
if(dumprect) MEM_freeN(dumprect);
|
||||||
dumprect= NULL;
|
dumprect= NULL;
|
||||||
|
|
||||||
if(UIbuttip || (G.qual & LR_SHIFTKEY)) { /* full screen */
|
if(UIbuttip || (G.qual & LR_SHIFTKEY) || fscreen) { /* full screen */
|
||||||
x= 0;
|
x= 0;
|
||||||
y= 0;
|
y= 0;
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ int blenderqread(unsigned short event, short val)
|
|||||||
}
|
}
|
||||||
else if(G.qual & LR_CTRLKEY) {
|
else if(G.qual & LR_CTRLKEY) {
|
||||||
/* all alt+ctrl+shift combos are needed here... */
|
/* all alt+ctrl+shift combos are needed here... */
|
||||||
BIF_screendump();
|
BIF_screendump(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F4KEY:
|
case F4KEY:
|
||||||
|
@ -257,8 +257,7 @@ void BL_MakeScreenShot(struct ScrArea *area, const char* filename)
|
|||||||
// filename read - only
|
// filename read - only
|
||||||
|
|
||||||
/* XXX will need to change at some point */
|
/* XXX will need to change at some point */
|
||||||
BIF_screendump();
|
BIF_screendump(0);
|
||||||
/* BIF_screendump(area); */
|
|
||||||
|
|
||||||
// write+read filename
|
// write+read filename
|
||||||
write_screendump((char*) copyfilename);
|
write_screendump((char*) copyfilename);
|
||||||
|
Loading…
Reference in New Issue
Block a user