Blender V5.3
node_geo_common.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "BKE_node.hh"
6
7#include "NOD_geometry.hh"
8
9#include "NOD_common.hh"
10#include "node_common.h"
11#include "node_geometry_util.hh"
12
13#include "RNA_access.hh"
14
15namespace blender {
16
17namespace nodes {
18
20{
21 static bke::bNodeType ntype;
22
23 bke::node_type_base_custom(ntype, "GeometryNodeGroup", "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("GeometryNodeGroup");
32 BLI_assert(ntype.rna_ext.srna != nullptr);
34
38
40}
42
43} // namespace nodes
44
46{
47 /* These methods can be overridden but need a default implementation otherwise. */
48 if (ntype->poll == nullptr) {
50 }
51 if (ntype->insert_link == nullptr) {
53 }
55}
56
57} // 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
static void register_node_type_geo_group()
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)
bool geo_node_poll_default(const bke::bNodeType *, const bNodeTree *ntree, const char **r_disabled_hint)
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 register_node_type_geo_custom_group(bke::bNodeType *ntype)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
bool node_group_poll_instance(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
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