Fix: Missing compositor warning for Render Layers

The Render Layers node didn't draw a warning in the viewport when an
unsupported pass is used. This patch adds that warning.
This commit is contained in:
Omar Emara 2022-11-25 12:57:16 +02:00
parent 64c26d2862
commit 32690cafd1
1 changed files with 5 additions and 1 deletions

View File

@ -853,7 +853,11 @@ class RenderLayerOperation : public NodeOperation {
/* Other output passes are not supported for now, so allocate them as invalid. */
for (const bNodeSocket *output : this->node()->output_sockets()) {
if (!STR_ELEM(output->identifier, "Image", "Alpha")) {
get_result(output->identifier).allocate_invalid();
Result &unsupported_result = get_result(output->identifier);
if (unsupported_result.should_compute()) {
unsupported_result.allocate_invalid();
context().set_info_message("Viewport compositor setup not fully supported");
}
}
}
}