Index: release/scripts/ui/properties_render.py =================================================================== --- release/scripts/ui/properties_render.py (revision 28453) +++ release/scripts/ui/properties_render.py (working copy) @@ -314,7 +314,16 @@ if rd.file_format in ('AVI_JPEG', 'JPEG'): split = layout.split() split.prop(rd, "file_quality", slider=True) + + elif rd.file_format == 'MULTILAYER': + split = layout.split() + col = split.column() + col.label(text="Codec:") + col.prop(rd, "exr_codec", text="") + if wide_ui: + col = split.column() + elif rd.file_format == 'OPEN_EXR': split = layout.split() Index: source/blender/render/intern/source/pipeline.c =================================================================== --- source/blender/render/intern/source/pipeline.c (revision 28453) +++ source/blender/render/intern/source/pipeline.c (working copy) @@ -725,7 +725,8 @@ for(rlp= rrpart->layers.first; rlp; rlp= rlp->next) { if(rrpart->crop) { /* filters add pixel extra */ - offs= (rrpart->crop + rrpart->crop*rrpart->rectx); + //offs= (rrpart->crop + rrpart->crop*rrpart->rectx); + offs= rrpart->crop; } else { offs= 0; @@ -736,7 +737,7 @@ int a, xstride= 4; for(a=0; aexrhandle, rlp->name, get_pass_name(SCE_PASS_COMBINED, a), - xstride, xstride*rrpart->rectx, rlp->rectf+a + xstride*offs); + xstride, xstride*rrpart->rectx, rlp->rectf+a + xstride*offs); } /* passes are allocated in sync */ Index: source/blender/imbuf/intern/openexr/openexr_api.cpp =================================================================== --- source/blender/imbuf/intern/openexr/openexr_api.cpp (revision 28453) +++ source/blender/imbuf/intern/openexr/openexr_api.cpp (working copy) @@ -449,7 +449,7 @@ openexr_header_compression(&header, compress); /* header.lineOrder() = DECREASING_Y; this crashes in windows for file read! */ - + header.insert ("BlenderMultiChannel", StringAttribute ("Blender V2.43 and newer")); data->ofile = new OutputFile(filename, header); @@ -546,17 +546,36 @@ ExrChannel *echan; for(echan= (ExrChannel *)data->channels.first; echan; echan= echan->next) { - float *rect= echan->rect - echan->xstride*partx - echan->ystride*party; + /* OLD + float *rect= echan->rect - echan->xstride*partx - echan->ystride*party ; + + frameBuffer.insert (echan->name, Slice (FLOAT, (char *)rect, + echan->xstride*sizeof(float), echan->ystride*sizeof(float))); + */ + /* coordinates for relative tile coordinates, starting from top of tile, + striding left->right, top->bottom */ + float *rect= echan->rect + (data->tiley)*echan->ystride; + int xs = echan->xstride*sizeof(float); + int ys = -echan->ystride*sizeof(float); + frameBuffer.insert (echan->name, Slice (FLOAT, (char *)rect, - echan->xstride*sizeof(float), echan->ystride*sizeof(float))); + xs, ys, //xStride, yStride + 1, 1, 0.0, // xSampling, ySampling, fillValue + true, true) ); // xTileCoords, yTileCoords (use relative tile coords) } data->tofile->setFrameBuffer (frameBuffer); try { - // printf("write tile %d %d\n", partx/data->tilex, party/data->tiley); - data->tofile->writeTile (partx/data->tilex, party/data->tiley, level); + int x, y; + x = partx/data->tilex; + /* y = party/data->tiley; // old */ + + /* flip tile grid vertically to conform to EXR coordinate system */ + y = ceil(data->height/data->tiley) - (party/data->tiley); + + data->tofile->writeTile (x, y, level); } catch (const std::exception &exc) { std::cerr << "OpenEXR-writeTile: ERROR: " << exc.what() << std::endl; @@ -570,9 +589,12 @@ ExrChannel *echan; if(data->channels.first) { - for(echan= (ExrChannel *)data->channels.first; echan; echan= echan->next) - frameBuffer.insert (echan->name, Slice (FLOAT, (char *)echan->rect, - echan->xstride*sizeof(float), echan->ystride*sizeof(float))); + for(echan= (ExrChannel *)data->channels.first; echan; echan= echan->next) { + float *rect = echan->rect + echan->xstride*(data->height-1)*data->width; + + frameBuffer.insert (echan->name, Slice (FLOAT, (char *)rect, + echan->xstride*sizeof(float), -echan->ystride*sizeof(float))); + } data->ofile->setFrameBuffer (frameBuffer); data->ofile->writePixels (data->height); @@ -591,8 +613,8 @@ for(echan= (ExrChannel *)data->channels.first; echan; echan= echan->next) { /* no datawindow correction needed */ if(echan->rect) - frameBuffer.insert (echan->name, Slice (FLOAT, (char *)echan->rect, - echan->xstride*sizeof(float), echan->ystride*sizeof(float))); + frameBuffer.insert (echan->name, Slice (FLOAT, (char *)(echan->rect + echan->xstride*(data->height-1)*data->width), + echan->xstride*sizeof(float), -echan->ystride*sizeof(float))); else printf("warning, channel with no rect set %s\n", echan->name); }