Files
test/source/blender/nodes/intern/node_common.h
Jacques Lucke f4b9ca758a Nodes: add color tag to node groups
This allows setting a color tag for node groups which affects the header
color of group nodes. With this, node groups can look even more similar
to built-in nodes. The only remaining difference is the node group icon in
the node header.

Blender has quite a few different built-in color tags. Most of those are
exposed with very few exceptions. For example, the layout, interface
and pattern categories are not exposed because they are only for built-in
nodes or are not used anymore.

It's generally agreed upon that the set of different color tags is likely too
large. Some differences between color make more sense in some contexts
than in others. In the interest of consistency, it was decided to expose all
these categories anyway. If we ever decide to consolidate them, the worst
that can happen is that a group looses it's category, which wouldn't be too bad.

Pull Request: https://projects.blender.org/blender/blender/pulls/121385
2024-05-08 22:00:35 +02:00

42 lines
1001 B
C++

/* SPDX-FileCopyrightText: 2007 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup nodes
*/
#pragma once
#include "DNA_listBase.h"
#ifdef __cplusplus
extern "C" {
#endif
struct bNodeTree;
/** Groups display their internal tree name as label. */
void node_group_label(const struct bNodeTree *ntree,
const struct bNode *node,
char *label,
int label_maxncpy);
bool node_group_poll_instance(const struct bNode *node,
const struct bNodeTree *nodetree,
const char **r_disabled_hint);
int node_group_ui_class(const struct bNode *node);
/**
* Global update function for Reroute node types.
* This depends on connected nodes, so must be done as a tree-wide update.
*/
void ntree_update_reroute_nodes(struct bNodeTree *ntree);
#ifdef __cplusplus
}
# include <string>
std::string node_group_ui_description(const bNode &node);
#endif