From fb03217c5dcc343361283df2f846aed0334a58dd Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Tue, 3 Jun 2025 13:32:43 +0300 Subject: [PATCH] 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. --- source/blender/render/intern/compositor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/render/intern/compositor.cc b/source/blender/render/intern/compositor.cc index 7653812ace1..36a62bfe068 100644 --- a/source/blender/render/intern/compositor.cc +++ b/source/blender/render/intern/compositor.cc @@ -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);