Blender V4.3
node_composite_common.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
9#include "DNA_node_types.h"
10
11#include "NOD_common.h"
12#include "node_common.h"
14
15#include "BKE_node.hh"
16
17#include "RNA_access.hh"
18
20{
21 static blender::bke::bNodeType ntype;
22
23 /* NOTE: Cannot use sh_node_type_base for node group, because it would map the node type
24 * to the shared NODE_GROUP integer type id. */
26 &ntype, "CompositorNodeGroup", "Group", "GROUP", NODE_CLASS_GROUP);
27 ntype.type = NODE_GROUP;
33 ntype.rna_ext.srna = RNA_struct_find("CompositorNodeGroup");
34 BLI_assert(ntype.rna_ext.srna != nullptr);
36
37 blender::bke::node_type_size(&ntype, 140, 60, 400);
40
42}
43
45{
46 /* These methods can be overridden but need a default implementation otherwise. */
47 if (ntype->poll == nullptr) {
49 }
50 if (ntype->insert_link == nullptr) {
52 }
54}
#define NODE_GROUP
Definition BKE_node.hh:800
#define NODE_CLASS_GROUP
Definition BKE_node.hh:409
#define BLI_assert(a)
Definition BLI_assert.h:50
void node_type_size(bNodeType *ntype, int width, int minwidth, int maxwidth)
Definition node.cc:4602
void node_register_type(bNodeType *ntype)
Definition node.cc:1708
void node_type_base_custom(bNodeType *ntype, const char *idname, const char *name, const char *enum_name, short nclass)
Definition node.cc:4364
void node_group_declare(NodeDeclarationBuilder &b)
int node_group_ui_class(const bNode *node)
void node_group_label(const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
bool node_group_poll_instance(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
std::string node_group_ui_description(const bNode &node)
void register_node_type_cmp_group()
void register_node_type_cmp_custom_group(blender::bke::bNodeType *ntype)
bool cmp_node_poll_default(const blender::bke::bNodeType *, const bNodeTree *ntree, const char **r_disabled_hint)
bool node_insert_link_default(bNodeTree *, bNode *, bNodeLink *)
Definition node_util.cc:281
StructRNA * RNA_struct_find(const char *identifier)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
StructRNA * srna
Definition RNA_types.hh:780
Defines a node type.
Definition BKE_node.hh:218
int(* ui_class)(const bNode *node)
Definition BKE_node.hh:252
bool(* poll_instance)(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
Definition BKE_node.hh:304
void(* labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
Definition BKE_node.hh:249
std::string(* ui_description_fn)(const bNode &node)
Definition BKE_node.hh:254
bool(* poll)(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint)
Definition BKE_node.hh:299
bool(* insert_link)(bNodeTree *ntree, bNode *node, bNodeLink *link)
Definition BKE_node.hh:309
NodeDeclareFunction declare
Definition BKE_node.hh:347