Files
test/source/blender/blenkernel/BKE_compositor.hh
Omar Emara d84d779661 Compositor: Improve unsupported passes warning
This patch improves warnings displayed when the user attempts to use
passes in render engines other than EEVEE with the viewport compositor.

Previously, an error icon was always displayed if the viewport
compositor was in use as well as a viewport overlay text. This error
existed even when the render engine was set to EEVEE and even if the
passes are not actually used, which was always confusing for users.

This patch improves this by only displaying the error when a pass is
actually used and when a non-EEVEE render engine is used.

This is implemented internally as an extra info callback for the node.
And the compositor_unsupported_message member hack was removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/144005
2025-08-07 12:18:06 +02:00

31 lines
895 B
C++

/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup bke
*/
#pragma once
#include <string>
#include "BLI_set.hh"
struct Scene;
struct ViewLayer;
struct bContext;
namespace blender::bke::compositor {
/* Get the set of all passes used by the compositor for the given view layer, identified by their
* pass names. This might be a superset of the passes actually supported by the render engine, in
* which case, the compositor will return an invalid output and issue a warning. */
Set<std::string> get_used_passes(const Scene &scene, const ViewLayer *view_layer);
/* Checks if the viewport compositor is currently being used. This is similar to
* DRWContext::is_viewport_compositor_enabled but checks all 3D views. */
bool is_viewport_compositor_used(const bContext &context);
} // namespace blender::bke::compositor