Index: source/blender/makesdna/DNA_scene_types.h =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/makesdna/DNA_scene_types.h,v retrieving revision 1.74 diff -u -r1.74 DNA_scene_types.h --- source/blender/makesdna/DNA_scene_types.h 2 Jul 2006 18:26:20 -0000 1.74 +++ source/blender/makesdna/DNA_scene_types.h 21 Jul 2006 23:42:46 -0000 @@ -288,6 +288,8 @@ float GIshadowquality, GIrefinement, GIpower, GIindirpower; float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold; + char stamp_u_data[128];//rcruiz + char backbuf[160], pic[160], ftype[160]; } RenderData; @@ -429,6 +431,7 @@ #define R_FBUF 0x40000 #define R_THREADS 0x80000 #define R_SPEED 0x100000 +#define R_STAMP_INFO 0x20000//rcruiz /* filtertype */ #define R_FILTER_BOX 0 Index: source/blender/render/intern/source/pipeline.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/render/intern/source/pipeline.c,v retrieving revision 1.89 diff -u -r1.89 pipeline.c --- source/blender/render/intern/source/pipeline.c 18 Jul 2006 16:42:39 -0000 1.89 +++ source/blender/render/intern/source/pipeline.c 21 Jul 2006 23:47:38 -0000 @@ -1735,7 +1735,150 @@ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +//] = */ {0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00}, +/* [?] = */ {0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x18,0x0c,0xcc,0x78,0x00}, +/* [@] = */ {0x00,0x00,0x7c,0xc0,0xc0,0xde,0xde,0xde,0xc6,0xc6,0x7c,0x00}, +/* [A] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x78,0x30,0x00}, +/* [B] = */ {0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [C] = */ {0x00,0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xc0,0xc6,0x66,0x3c,0x00}, +/* [D] = */ {0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00}, +/* [E] = */ {0x00,0x00,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00}, +/* [F] = */ {0x00,0x00,0xf0,0x60,0x60,0x64,0x7c,0x64,0x62,0x66,0xfe,0x00}, +/* [G] = */ {0x00,0x00,0x3e,0x66,0xc6,0xce,0xc0,0xc0,0xc6,0x66,0x3c,0x00}, +/* [H] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [I] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00}, +/* [J] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x1e,0x00}, +/* [K] = */ {0x00,0x00,0xe6,0x66,0x6c,0x6c,0x78,0x6c,0x6c,0x66,0xe6,0x00}, +/* [L] = */ {0x00,0x00,0xfe,0x66,0x66,0x62,0x60,0x60,0x60,0x60,0xf0,0x00}, +/* [M] = */ {0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xfe,0xfe,0xee,0xc6,0x00}, +/* [N] = */ {0x00,0x00,0xc6,0xc6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0xc6,0x00}, +/* [O] = */ {0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00}, +/* [P] = */ {0x00,0x00,0xf0,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [Q] = */ {0x00,0x1e,0x0c,0x7c,0xde,0xce,0xc6,0xc6,0xc6,0x6c,0x38,0x00}, +/* [R] = */ {0x00,0x00,0xe6,0x66,0x66,0x6c,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [S] = */ {0x00,0x00,0x78,0xcc,0xcc,0x18,0x70,0xc0,0xcc,0xcc,0x78,0x00}, +/* [T] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0xb4,0xfc,0x00}, +/* [U] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [V] = */ {0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [W] = */ {0x00,0x00,0x6c,0x6c,0x6c,0xd6,0xd6,0xc6,0xc6,0xc6,0xc6,0x00}, +/* [X] = */ {0x00,0x00,0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc,0xcc,0x00}, +/* [Y] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [Z] = */ {0x00,0x00,0xfe,0xc6,0x62,0x60,0x30,0x18,0x98,0xce,0xfe,0x00}, +/* [[] = */ {0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00}, +/* [\] = */ {0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00}, +/* []] = */ {0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00}, +/* [^] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x10}, +/* [_] = */ {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, +/* [`] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x30}, +/* [a] = */ {0x00,0x00,0x76,0xcc,0xcc,0x7c,0x0c,0x78,0x00,0x00,0x00,0x00}, +/* [b] = */ {0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xe0,0x00}, +/* [c] = */ {0x00,0x00,0x78,0xcc,0xc0,0xc0,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [d] = */ {0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1c,0x00}, +/* [e] = */ {0x00,0x00,0x78,0xcc,0xc0,0xfc,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [f] = */ {0x00,0x00,0xf0,0x60,0x60,0x60,0xf8,0x60,0x60,0x6c,0x38,0x00}, +/* [g] = */ {0x78,0xcc,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00}, +/* [h] = */ {0x00,0x00,0xe6,0x66,0x66,0x66,0x76,0x6c,0x60,0x60,0xe0,0x00}, +/* [i] = */ {0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x78,0x00,0x18,0x18,0x00}, +/* [j] = */ {0x78,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x0c,0x0c,0x00}, +/* [k] = */ {0x00,0x00,0xe6,0x66,0x6c,0x78,0x6c,0x66,0x60,0x60,0xe0,0x00}, +/* [l] = */ {0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x00}, +/* [m] = */ {0x00,0x00,0xc6,0xd6,0xd6,0xd6,0xd6,0xfc,0x00,0x00,0x00,0x00}, +/* [n] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xf8,0x00,0x00,0x00,0x00}, +/* [o] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [p] = */ {0xf0,0x60,0x7c,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00}, +/* [q] = */ {0x1e,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00}, +/* [r] = */ {0x00,0x00,0xf0,0x60,0x60,0x76,0x6e,0xec,0x00,0x00,0x00,0x00}, +/* [s] = */ {0x00,0x00,0x78,0xcc,0x18,0x60,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [t] = */ {0x00,0x00,0x38,0x6c,0x60,0x60,0x60,0xfc,0x60,0x20,0x00,0x00}, +/* [u] = */ {0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00}, +/* [v] = */ {0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00}, +/* [w] = */ {0x00,0x00,0x6c,0x6c,0xd6,0xd6,0xc6,0xc6,0x00,0x00,0x00,0x00}, +/* [x] = */ {0x00,0x00,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00}, +/* [y] = */ {0xf0,0x18,0x0c,0x3c,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00}, +/* [z] = */ {0x00,0x00,0xfc,0xc4,0x60,0x18,0x8c,0xfc,0x00,0x00,0x00,0x00}, +/* [{] = */ {0x00,0x00,0x1c,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x1c,0x00}, +/* [|] = */ {0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00}, +/* [}] = */ {0x00,0x00,0xe0,0x30,0x30,0x18,0x0c,0x18,0x30,0x30,0xe0,0x00}, +/* [~] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xda,0x73,0x00}, +}; + +void pasatexto(char* texto, unsigned short xref,unsigned short yref,Render *re) { //write text based in x y. if the text is to long it will continue un next row + int lentexto=strlen(texto); + int i,j,cha=0; + unsigned char ftlnbt; + unsigned short width = re->rectx; + unsigned short height = re->recty; + RenderResult rres; + RE_GetResultImage(re, &rres); + unsigned short x,y,textposx; + for (i=0; i < lentexto; i++,j++) { + cha=texto[i]-32; + if(cha<0||cha>94) + cha=0; + textposx=xref+(j*8); + if ((textposx+8)>width){ + yref+=12; + textposx=xref=1; + j=0; + } + if (yref+12>height) + return; + for (y=0;y<12;y++){ + float* bpt = (float*)rres.rectf + ((((height-1)-yref+y)*width)<<2); + bpt=bpt+(4*textposx); + for (x=0;x<8;x++) { + ftlnbt=fntdat[cha][y]; + if(ftlnbt&(0x80>>x)){ + bpt[0]=1; + bpt[1]=bpt[2]=0; + } + bpt += 4; + } + } + } +} + +void stamp (Render *re){ //basic stamp info + char text[254],dat[9],tim[9]; + _strdate( dat); + _strtime( tim ); + sprintf(text,"Date:%s Time:%s Cam:%s Scn:%s Usr:%s Frm:%i",dat,tim,G.scene->camera->id.name,G.scene->id.name,re->r.stamp_u_data,G.scene->r.cfra); + pasatexto(text,1,13,re); //write text into render output +} +//rcruiz> /* main loop: doing sequence + fields + blur + 3d render + compositing */ static void do_render_all_options(Render *re) @@ -1759,6 +1902,8 @@ re->i.lastframetime= PIL_check_seconds_timer()- re->i.starttime; re->stats_draw(&re->i); + if (re->r.mode & R_STAMP_INFO)//rcruiz + stamp(re);//rcruiz } static int is_rendering_allowed(Render *re) Index: source/blender/src/buttons_scene.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/src/buttons_scene.c,v retrieving revision 1.141 diff -u -r1.141 buttons_scene.c --- source/blender/src/buttons_scene.c 11 Jul 2006 11:54:59 -0000 1.141 +++ source/blender/src/buttons_scene.c 21 Jul 2006 23:50:43 -0000 @@ -1171,8 +1171,15 @@ uiBlockEndAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); - uiDefButBitS(block, TOG, R_BACKBUF, B_NOP,"Backbuf", 10, 94, 80, 20, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image"); - uiDefButBitI(block, TOG, R_THREADS, B_NOP,"Threads", 10, 68, 80, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable render in two threads"); + //r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image"); + uiDefButBitI(block, TOG, R_THREADS, B_NOP,"Threads", 10, 74, 80, 19, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable render in two threads"); + if (G.scene->r.mode&R_STAMP_INFO){ + uiDefButBitI(block, TOG, R_STAMP_INFO, B_REDR,"SI", 10, 54, 10, 19, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable stamp info in render");//rcruiz + uiDefBut(block, TEX, B_NOP, "U:", 20,54,70,19, &G.scene->r.stamp_u_data, 0.0,128.0, 100, 0, "");//rcruiz + } else + uiDefButBitI(block, TOG, R_STAMP_INFO, B_REDR,"StampInfo", 10, 54, 80, 19, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable stamp info in render");//rcruiz + //rcruiz> uiBlockSetCol(block, TH_AUTO); uiBlockBeginAlign(block);