Compositor: Fallback to render size for viewing values

Fallback to the render size when a single value is connected to the
viewer node. Giving the user the ability to easily view values.
This commit is contained in:
Omar Emara 2024-01-04 11:12:45 +02:00
parent 472cf44166
commit d096927139
1 changed files with 3 additions and 1 deletions

View File

@ -210,7 +210,9 @@ class ViewerOperation : public NodeOperation {
* size, so use the input directly. Otherwise, no dedicated viewer exist so the input should be
* in the domain of the compositing region. */
if (context().use_composite_output()) {
return NodeOperation::compute_domain();
const Domain domain = NodeOperation::compute_domain();
/* Fallback to the compositing region size in case of a single value domain. */
return domain.size == int2(1) ? Domain(context().get_compositing_region_size()) : domain;
}
else {
return Domain(context().get_compositing_region_size());