Blender V5.3
node_composite_group.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2006 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "DNA_node_types.h"
6
7#include "NOD_common.hh"
8#include "node_common.h"
10
11#include "BKE_node.hh"
12
13#include "RNA_access.hh"
14
16
17static void node_register()
18{
19 static bke::bNodeType ntype;
20
21 /* NOTE: Cannot use sh_node_type_base for node group, because it would map the node type
22 * to the shared NODE_GROUP integer type id. */
23 bke::node_type_base_custom(ntype, "CompositorNodeGroup", "Group", "GROUP", NODE_CLASS_GROUP);
24 ntype.enum_name_legacy = "GROUP";
25 ntype.type_legacy = NODE_GROUP;
31 ntype.rna_ext.srna = RNA_struct_find("CompositorNodeGroup");
32 BLI_assert(ntype.rna_ext.srna != nullptr);
34
38
40}
42
43} // namespace blender::nodes::node_composite_group_cc
44
45namespace blender {
46
48{
49 /* These methods can be overridden but need a default implementation otherwise. */
50 if (ntype->poll == nullptr) {
52 }
53 if (ntype->insert_link == nullptr) {
55 }
57}
58
59} // namespace blender
#define NODE_GROUP
Definition BKE_node.hh:865
#define NODE_CLASS_GROUP
Definition BKE_node.hh:483
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
void node_type_base_custom(bNodeType &ntype, StringRefNull idname, StringRefNull name, StringRefNull enum_name, short nclass)
Definition node.cc:5896
void node_group_declare(NodeDeclarationBuilder &b)
BMesh Iterators.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
int node_group_ui_class(const bNode *node)
std::string node_group_ui_description(const bNode &node)
void node_group_label(const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
StructRNA * RNA_struct_find(const char *identifier)
bool node_insert_link_default(bke::NodeInsertLinkParams &)
Definition node_util.cc:223
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
bool cmp_node_poll_default(const bke::bNodeType *, const bNodeTree *ntree, const char **r_disabled_hint)
bool node_group_poll_instance(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
void register_node_type_cmp_custom_group(bke::bNodeType *ntype)
static constexpr int GroupMin
Definition BKE_node.hh:256
Defines a node type.
Definition BKE_node.hh:265
void(*) labelfunc(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
Definition BKE_node.hh:301
bool(*) poll(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint)
Definition BKE_node.hh:352
std::string(*) ui_description_fn(const bNode &node)
Definition BKE_node.hh:309
const char * enum_name_legacy
Definition BKE_node.hh:274
NodeDeclareFunction declare
Definition BKE_node.hh:393
int(*) ui_class(const bNode *node)
Definition BKE_node.hh:307
bool(*) insert_link(NodeInsertLinkParams &params)
Definition BKE_node.hh:364
bool(*) poll_instance(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
Definition BKE_node.hh:359