diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-17 18:05:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-17 18:05:29 +0300 |
commit | a262ea8c47f8106f66e16935c556f383ef306861 (patch) | |
tree | f37e53c16ba423c478b9522244183367c701b3b0 /source/blender/compositor/operations/COM_OutputFileOperation.cpp | |
parent | 410880552bfaf32f91eaad56bdf2c93c67cbd5c8 (diff) |
Cleanup: trailing space for compositor
Diffstat (limited to 'source/blender/compositor/operations/COM_OutputFileOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_OutputFileOperation.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index 39877e35605..db2598ad6dc 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -135,11 +135,11 @@ static void write_buffer_rect(rcti *rect, const bNodeTree *tree, for (y = y1; y < y2 && (!breaked); y++) { for (x = x1; x < x2 && (!breaked); x++) { reader->readSampled(color, x, y, COM_PS_NEAREST); - + for (i = 0; i < size; ++i) buffer[offset + i] = color[i]; offset += size; - + if (tree->test_break && tree->test_break(tree->tbh)) breaked = true; } @@ -154,13 +154,13 @@ OutputSingleLayerOperation::OutputSingleLayerOperation( { this->m_rd = rd; this->m_tree = tree; - + this->addInputSocket(datatype); - + this->m_outputBuffer = NULL; this->m_datatype = datatype; this->m_imageInput = NULL; - + this->m_format = format; BLI_strncpy(this->m_path, path, sizeof(this->m_path)); @@ -183,17 +183,17 @@ void OutputSingleLayerOperation::executeRegion(rcti *rect, unsigned int /*tileNu void OutputSingleLayerOperation::deinitExecution() { if (this->getWidth() * this->getHeight() != 0) { - + int size = get_datatype_size(this->m_datatype); ImBuf *ibuf = IMB_allocImBuf(this->getWidth(), this->getHeight(), this->m_format->planes, 0); char filename[FILE_MAX]; const char *suffix; - + ibuf->channels = size; ibuf->rect_float = this->m_outputBuffer; - ibuf->mall |= IB_rectfloat; + ibuf->mall |= IB_rectfloat; ibuf->dither = this->m_rd->dither_intensity; - + IMB_colormanagement_imbuf_for_write(ibuf, true, false, m_viewSettings, m_displaySettings, this->m_format); @@ -207,7 +207,7 @@ void OutputSingleLayerOperation::deinitExecution() printf("Cannot save Node File Output to %s\n", filename); else printf("Saved: %s\n", filename); - + IMB_freeImBuf(ibuf); } this->m_outputBuffer = NULL; @@ -221,7 +221,7 @@ OutputOpenExrLayer::OutputOpenExrLayer(const char *name_, DataType datatype_, bo BLI_strncpy(this->name, name_, sizeof(this->name)); this->datatype = datatype_; this->use_layer = use_layer_; - + /* these are created in initExecution */ this->outputBuffer = 0; this->imageInput = 0; @@ -233,7 +233,7 @@ OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation( { this->m_rd = rd; this->m_tree = tree; - + BLI_strncpy(this->m_path, path, sizeof(this->m_path)); this->m_exr_codec = exr_codec; this->m_exr_half_float = exr_half_float; @@ -285,11 +285,11 @@ void OutputOpenExrMultiLayerOperation::deinitExecution() OutputOpenExrLayer &layer = this->m_layers[i]; if (!layer.imageInput) continue; /* skip unconnected sockets */ - + add_exr_channels(exrhandle, this->m_layers[i].name, this->m_layers[i].datatype, "", width, this->m_exr_half_float, this->m_layers[i].outputBuffer); } - + /* when the filename has no permissions, this can fail */ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, NULL)) { IMB_exr_write_channels(exrhandle); @@ -299,14 +299,14 @@ void OutputOpenExrMultiLayerOperation::deinitExecution() /* XXX nice way to do report? */ printf("Error Writing Render Result, see console\n"); } - + IMB_exr_close(exrhandle); for (unsigned int i = 0; i < this->m_layers.size(); ++i) { if (this->m_layers[i].outputBuffer) { MEM_freeN(this->m_layers[i].outputBuffer); this->m_layers[i].outputBuffer = NULL; } - + this->m_layers[i].imageInput = NULL; } } |