31 for (
const bNodeSocket *output : node->output_sockets()) {
32 if (output->is_logically_linked()) {
33 if (
StringRef(output->identifier) ==
"Image") {
37 used_passes.
add(output->identifier);
53 Scene *scene =
reinterpret_cast<Scene *
>(node->id);
69 const std::string layer_name = layer_names.
contains(data->layer_name) ? data->layer_name :
79 const char *cryptomatte_type_name =
nullptr;
96 if (!cryptomatte_type_name) {
102 for (
const int i :
IndexRange(cryptomatte_layers_count)) {
103 used_passes.
add(fmt::format(
"{}{:02}", cryptomatte_type_name, i));
120 if (node->is_muted()) {
124 switch (node->type) {
128 if (node_trees_already_searched.
add(node_group_tree)) {
130 node_group_tree, view_layer, node_trees_already_searched, used_passes);
struct CryptomatteSession * BKE_cryptomatte_init_from_scene(const struct Scene *scene, bool build_meta_data)
#define NODE_CUSTOM_GROUP
#define CMP_NODE_CRYPTOMATTE
#define CMP_NODE_R_LAYERS
@ VIEW_LAYER_CRYPTOMATTE_MATERIAL
@ VIEW_LAYER_CRYPTOMATTE_ASSET
@ VIEW_LAYER_CRYPTOMATTE_OBJECT
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
#define RE_PASSNAME_COMBINED
#define RE_PASSNAME_CRYPTOMATTE_MATERIAL
#define RE_PASSNAME_CRYPTOMATTE_ASSET
#define RE_PASSNAME_CRYPTOMATTE_OBJECT
constexpr bool startswith(StringRef prefix) const
constexpr bool endswith(StringRef suffix) const
bool contains(const T &value) const
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
static void add_passes_used_by_cryptomatte_node(const bNode *node, const ViewLayer *view_layer, Set< std::string > &used_passes)
static void add_used_passes_recursive(const bNodeTree *node_tree, const ViewLayer *view_layer, Set< const bNodeTree * > &node_trees_already_searched, Set< std::string > &used_passes)
Set< std::string > get_used_passes(const Scene &scene, const ViewLayer *view_layer)
static void add_passes_used_by_render_layer_node(const bNode *node, Set< std::string > &used_passes)
std::unique_ptr< CryptomatteSession, CryptomatteSessionDeleter > CryptomatteSessionPtr
const blender::Vector< std::string > & BKE_cryptomatte_layer_names_get(const CryptomatteSession &session)