Skip to content

Commit

Permalink
Minor fixes around saving extra AOVs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Masson authored and dictoon committed Mar 5, 2018
1 parent 6994193 commit 252771c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/appleseed/renderer/modeling/frame/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ namespace
{
bool success = true;

if (extension != ".exr")
if (lower_case(extension) != ".exr")
{
RENDERER_LOG_ERROR("extra AOVs can only be saved as exr.");
return false;
Expand All @@ -717,7 +717,7 @@ namespace
const size_t image_index = aov_indices[i];
assert(image_index < images.size());

const Image & image = images.get_image(image_index);
const Image& image = images.get_image(image_index);

// Compute image file path.
const string aov_name = images.get_name(image_index);
Expand Down Expand Up @@ -750,7 +750,7 @@ bool Frame::write_main_image(const char* file_path) const
// Write BCD histograms and covariances if enabled.
if (impl->m_denoising_mode == DenoisingMode::WriteOutputs)
{
if (ends_with(file_path, ".exr"))
if (ends_with(lower_case(file_path), ".exr"))
impl->m_denoiser_aov->write_images(file_path);
else
RENDERER_LOG_ERROR("denoiser outputs can only be saved to exr images.");
Expand Down Expand Up @@ -785,7 +785,7 @@ bool Frame::write_aov_images(const char* file_path) const
success = false;
}

if (impl->m_save_extra_aovs && !aov_images().empty())
if (impl->m_save_extra_aovs)
{
success = success && write_extra_aovs(
aov_images(),
Expand Down Expand Up @@ -896,7 +896,7 @@ void Frame::write_main_and_aov_images_to_multipart_exr(const char* file_path) co
const size_t image_index = impl->m_extra_aovs[i];
assert(image_index < aov_images().size());

const Image & image = aov_images().get_image(image_index);
const Image& image = aov_images().get_image(image_index);
const CanvasProperties& props = image.properties();
const string aov_name = aov_images().get_name(image_index);
assert(props.m_channel_count == 4);
Expand Down

0 comments on commit 252771c

Please sign in to comment.