Fix: Cryptomatte pick layer is wrongly displayed sometime

The Cryptomatte pick layer in the compositor is wrongly displayed due to
color management getting applied even though it is non color data. This
is because the non color meta-data member of viewer images was not set
if it was newels created. To fix this, we make sure it gets set in all
code paths for the viewer.
This commit is contained in:
Omar Emara
2025-06-03 13:32:43 +03:00
parent 7ccdee4d15
commit fb03217c5d

View File

@@ -216,10 +216,13 @@ class Context : public compositor::Context {
{
return viewer_output_result_;
}
/* Otherwise, the size or precision changed, so release its data and reset it, then we
* reallocate it on the new domain below. */
viewer_output_result_.release();
viewer_output_result_ = this->create_result(compositor::ResultType::Color);
viewer_output_result_.set_transformation(domain.transformation);
viewer_output_result_.meta_data.is_non_color_data = is_data;
}
viewer_output_result_.set_precision(precision);