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:
authorTon Roosendaal <ton@blender.org>2006-01-09 13:55:41 +0300
committerTon Roosendaal <ton@blender.org>2006-01-09 13:55:41 +0300
commitf0aceff1966f76fdf32420b9e319eaa5341c364d (patch)
tree84c0892156689ff3c9d4f578856b3602aa5bc103 /source/blender/src
parentc693e01b8d9bd9af629b0fc8abab0a42a810c177 (diff)
Orange: Further cleanup of EXR saving
- F10 scene buttons now has options "half" and "zbuf" for exr saving. Note: when no float buffer is available, it always saves as "half", that's sufficient anyway, since half is 16 bits per channel. - EXR in imbuf now uses compliant ibuf->ftype flags for denoting exr extensions such as 'half' and 'compression'. - Removed ugly blenkernel dependency from exr module
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/buttons_scene.c22
-rw-r--r--source/blender/src/screendump.c7
-rw-r--r--source/blender/src/toets.c12
-rw-r--r--source/blender/src/writeimage.c3
4 files changed, 35 insertions, 9 deletions
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index 55450005793..4494d1d33c3 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -1218,12 +1218,13 @@ static void render_panel_format(void)
#ifdef __sgi
yofs = 76;
- uiDefButS(block, NUM,B_DIFF,"MaxSize:", 892,32,165,20, &G.scene->r.maximsize, 0.0, 500.0, 0, 0, "Maximum size per frame to save in an SGI movie");
- uiDefButBitI(block, TOG, R_COSMO, 0,"Cosmo", 1059,32,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Attempt to save SGI movies using Cosmo hardware");
+ uiDefButS(block, NUM,B_DIFF,"MaxSize:", 892,32,165,20, &G.scene->r.maximsize, 0.0, 500.0, 0, 0, "Maximum size per frame to save in an SGI movie");
+ uiDefButBitI(block, TOG, R_COSMO, 0,"Cosmo", 1059,32,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Attempt to save SGI movies using Cosmo hardware");
#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");
+ 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");
yofs -= 22;
@@ -1258,12 +1259,21 @@ static void render_panel_format(void)
uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for AVI");
}
#ifdef WITH_OPENEXR
- } else if (G.scene->r.imtype == R_OPENEXR ) {
+ }
+ else if (G.scene->r.imtype == R_OPENEXR ) {
if (G.scene->r.quality > 5) G.scene->r.quality = 0;
- uiDefButS(block, MENU,B_SET_OPENEXR, "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");
+
+ uiBlockBeginAlign(block);
+ 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);
+
+ 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");
+
#endif
} else {
- if(G.scene->r.quality < 5) G.scene->r.quality = 90; // temp
+ if(G.scene->r.quality < 5) G.scene->r.quality = 90; /* restore from openexr */
uiDefButS(block, NUM,B_DIFF, "Quality:", 892,yofs,112,20, &G.scene->r.quality, 10.0, 100.0, 0, 0, "Quality setting for JPEG images, AVI Jpeg and SGI movies");
}
diff --git a/source/blender/src/screendump.c b/source/blender/src/screendump.c
index cd51f1fdb0f..557a6f101a5 100644
--- a/source/blender/src/screendump.c
+++ b/source/blender/src/screendump.c
@@ -88,7 +88,12 @@ void write_screendump(char *name)
else if((G.have_libtiff) &&
(G.scene->r.imtype==R_TIFF)) ibuf->ftype= TIF;
#ifdef WITH_OPENEXR
- else if(G.scene->r.imtype==R_OPENEXR) ibuf->ftype= OPENEXR;
+ else if(G.scene->r.imtype==R_OPENEXR) {
+ ibuf->ftype= OPENEXR;
+ if(G.scene->r.subimtype & R_OPENEXR_HALF)
+ ibuf->ftype |= OPENEXR_HALF;
+ ibuf->ftype |= (G.scene->r.quality & OPENEXR_COMPRESS);
+ }
#endif
else if(G.scene->r.imtype==R_HAMX) ibuf->ftype= AN_hamx;
else if(ELEM5(G.scene->r.imtype, R_MOVIE, R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90)) {
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c
index 8fc3f740a0b..62f31f7f585 100644
--- a/source/blender/src/toets.c
+++ b/source/blender/src/toets.c
@@ -191,9 +191,8 @@ void schrijfplaatje(char *name)
else if(R.r.imtype==R_IRIZ) {
ibuf->ftype= IMAGIC;
if (ibuf->zbuf == 0) {
- if (R.rectz) {
+ if (R.rectz)
ibuf->zbuf = (int *)R.rectz;
- }
else printf("no zbuf\n");
}
}
@@ -211,7 +210,15 @@ void schrijfplaatje(char *name)
}
#ifdef WITH_OPENEXR
else if(R.r.imtype==R_OPENEXR) {
+ /* ibuf stores bitmasks for types */
ibuf->ftype= OPENEXR;
+ if(R.r.subimtype & R_OPENEXR_HALF)
+ ibuf->ftype |= OPENEXR_HALF;
+
+ ibuf->ftype |= (R.r.quality & OPENEXR_COMPRESS);
+
+ if(R.rectz && (R.r.subimtype & R_OPENEXR_ZBUF))
+ ibuf->zbuf = (int *)R.rectz;
}
#endif
else if((R.r.imtype==R_TARGA) || (R.r.imtype==R_PNG)) {
@@ -533,6 +540,7 @@ void BIF_save_rendered_image(void)
}
R.r.imtype= G.scene->r.imtype;
+ R.r.subimtype= G.scene->r.subimtype;
R.r.quality= G.scene->r.quality;
R.r.planes= G.scene->r.planes;
diff --git a/source/blender/src/writeimage.c b/source/blender/src/writeimage.c
index 4497ed51e81..4f1224eabff 100644
--- a/source/blender/src/writeimage.c
+++ b/source/blender/src/writeimage.c
@@ -66,6 +66,9 @@ int BIF_write_ibuf(ImBuf *ibuf, char *name)
#ifdef WITH_OPENEXR
else if (G.scene->r.imtype==R_OPENEXR) {
ibuf->ftype= OPENEXR;
+ if(G.scene->r.subimtype & R_OPENEXR_HALF)
+ ibuf->ftype |= OPENEXR_HALF;
+ ibuf->ftype |= (G.scene->r.quality & OPENEXR_COMPRESS);
}
#endif
else if ((G.scene->r.imtype==R_TARGA) || (G.scene->r.imtype==R_PNG)) {