Fix #98475: Full frame compositor: File Output node using EXR-Multilayer is broken
The same input (original image) was used for all layers. Now the operation correctly assigns the right input to the right output buffer. Pull Request: https://projects.blender.org/blender/blender/pulls/107709
This commit is contained in:
committed by
Habib Gahbiche
parent
36983fb5e4
commit
7495a1dee1
@@ -453,15 +453,16 @@ void OutputOpenExrMultiLayerOperation::update_memory_buffer_partial(MemoryBuffer
|
||||
const rcti &area,
|
||||
Span<MemoryBuffer *> inputs)
|
||||
{
|
||||
const MemoryBuffer *input_image = inputs[0];
|
||||
for (int i = 0; i < layers_.size(); i++) {
|
||||
OutputOpenExrLayer &layer = layers_[i];
|
||||
int layer_num_channels = COM_data_type_num_channels(layer.datatype);
|
||||
if (layer.output_buffer) {
|
||||
MemoryBuffer output_buf(layer.output_buffer,
|
||||
COM_data_type_num_channels(layer.datatype),
|
||||
layer_num_channels,
|
||||
this->get_width(),
|
||||
this->get_height());
|
||||
output_buf.copy_from(input_image, area);
|
||||
/* Input node always has 4 channels. Not all are needed depending on datatype. */
|
||||
output_buf.copy_from(inputs[i], area, 0, layer_num_channels, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user