diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_OutputFileOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_OutputFileOperation.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cc b/source/blender/compositor/operations/COM_OutputFileOperation.cc index cb9c2e4a16b..5184cd42b9e 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cc +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cc @@ -330,7 +330,7 @@ void OutputOpenExrMultiLayerOperation::add_layer(const char *name, bool use_layer) { this->addInputSocket(datatype); - this->m_layers.push_back(OutputOpenExrLayer(name, datatype, use_layer)); + this->m_layers.append(OutputOpenExrLayer(name, datatype, use_layer)); } StampData *OutputOpenExrMultiLayerOperation::createStampData() const @@ -340,17 +340,16 @@ StampData *OutputOpenExrMultiLayerOperation::createStampData() const RenderResult render_result; StampData *stamp_data = BKE_stamp_info_from_scene_static(m_scene); render_result.stamp_data = stamp_data; - for (int i = 0; i < this->m_layers.size(); i++) { - const OutputOpenExrLayer *layer = &this->m_layers[i]; + for (const OutputOpenExrLayer &layer : m_layers) { /* Skip unconnected sockets. */ - if (layer->imageInput == nullptr) { + if (layer.imageInput == nullptr) { continue; } - std::unique_ptr<MetaData> meta_data = layer->imageInput->getMetaData(); + std::unique_ptr<MetaData> meta_data = layer.imageInput->getMetaData(); if (meta_data) { blender::StringRef layer_name = blender::bke::cryptomatte::BKE_cryptomatte_extract_layer_name( - blender::StringRef(layer->name, BLI_strnlen(layer->name, sizeof(layer->name)))); + blender::StringRef(layer.name, BLI_strnlen(layer.name, sizeof(layer.name)))); meta_data->replaceHashNeutralCryptomatteKeys(layer_name); meta_data->addToRenderResult(&render_result); } |