Render feature request; when saving EXR files during anim render, it can
optionally save a jpg next to it, with compression as set in buttons. This allows quick previews or download from farms. Button: next to the 'half' and 'zbuf' options for exr.
This commit is contained in:
parent
9facc0b20e
commit
902bc75c34
@ -447,6 +447,7 @@ typedef struct Scene {
|
||||
/* subimtype, flag options for imtype */
|
||||
#define R_OPENEXR_HALF 1
|
||||
#define R_OPENEXR_ZBUF 2
|
||||
#define R_PREVIEW_JPG 4
|
||||
|
||||
|
||||
/* **************** SCENE ********************* */
|
||||
|
@ -1055,13 +1055,21 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra)
|
||||
ibuf->rect_float= rres.rectf;
|
||||
ibuf->zbuf_float= rres.rectz;
|
||||
ok= BKE_write_ibuf(ibuf, name, scene->r.imtype, scene->r.subimtype, scene->r.quality);
|
||||
IMB_freeImBuf(ibuf); /* imbuf knows which rects are not part of ibuf */
|
||||
|
||||
if(ok==0) {
|
||||
printf("Render error: cannot save %s\n", name);
|
||||
break;
|
||||
}
|
||||
else printf("Saved: %s", name);
|
||||
|
||||
/* optional preview images for exr */
|
||||
if(ok && scene->r.imtype==R_OPENEXR && (scene->r.subimtype & R_PREVIEW_JPG)) {
|
||||
if(BLI_testextensie(name, ".exr")) name[strlen(name)-4]= 0;
|
||||
BKE_add_image_extension(name, R_JPEG90);
|
||||
BKE_write_ibuf(ibuf, name, R_JPEG90, scene->r.subimtype, scene->r.quality);
|
||||
printf("Saved: %s", name);
|
||||
}
|
||||
|
||||
IMB_freeImBuf(ibuf); /* imbuf knows which rects are not part of ibuf */
|
||||
}
|
||||
|
||||
BLI_timestr(re->i.lastframetime, name);
|
||||
|
@ -1268,8 +1268,7 @@ static void render_panel_format(void)
|
||||
#endif
|
||||
|
||||
|
||||
uiDefButS(block, MENU,B_FILETYPEMENU,imagetype_pup(), 892,yofs,174,20, &G.scene->r.imtype, 0, 0, 0, 0, "Images are saved in this file format");
|
||||
uiDefButBitI(block, TOG, R_MOVIECROP, B_DIFF, "Crop", 1068,yofs,51,20, &G.scene->r.mode, 0, 0, 0, 0, "Exclude border rendering from total image");
|
||||
uiDefButS(block, MENU,B_FILETYPEMENU,imagetype_pup(), 892,yofs,225,20, &G.scene->r.imtype, 0, 0, 0, 0, "Images are saved in this file format");
|
||||
|
||||
yofs -= 22;
|
||||
|
||||
@ -1312,6 +1311,7 @@ static void render_panel_format(void)
|
||||
uiDefButBitS(block, TOG, R_OPENEXR_HALF, B_NOP,"Half", 892,yofs+44,60,20, &G.scene->r.subimtype, 0, 0, 0, 0, "Use 16 bits float 'Half' type");
|
||||
uiDefButBitS(block, TOG, R_OPENEXR_ZBUF, B_NOP,"Zbuf", 952,yofs+44,60,20, &G.scene->r.subimtype, 0, 0, 0, 0, "Save the zbuffer as 32 bits unsigned int");
|
||||
uiBlockEndAlign(block);
|
||||
uiDefButBitS(block, TOG, R_PREVIEW_JPG, B_NOP,"Preview",1027,yofs+44,90,20, &G.scene->r.subimtype, 0, 0, 0, 0, "When animation render, save JPG preview images in same directory");
|
||||
|
||||
uiDefButS(block, MENU,B_NOP, "Codec %t|None %x0|Pxr24 (lossy) %x1|ZIP (lossless) %x2|PIZ (lossless) %x3|RLE (lossless) %x4",
|
||||
892,yofs,112,20, &G.scene->r.quality, 0, 0, 0, 0, "Set codec settings for OpenEXR");
|
||||
|
Loading…
Reference in New Issue
Block a user