Blender V4.3
node_function_util.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
6#include "node_util.hh"
7
9
10static bool fn_node_poll_default(const blender::bke::bNodeType * /*ntype*/,
11 const bNodeTree *ntree,
12 const char **r_disabled_hint)
13{
14 /* Function nodes are only supported in simulation node trees so far. */
15 if (!STREQ(ntree->idname, "GeometryNodeTree")) {
16 *r_disabled_hint = RPT_("Not a geometry node tree");
17 return false;
18 }
19 return true;
20}
21
22void fn_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
23{
24 blender::bke::node_type_base(ntype, type, name, nclass);
28}
#define STREQ(a, b)
#define RPT_(msgid)
void node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
Definition node.cc:4325
void search_link_ops_for_basic_node(GatherLinkSearchOpParams &params)
void fn_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
static bool fn_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
char idname[64]
Defines a node type.
Definition BKE_node.hh:218
bool(* poll)(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint)
Definition BKE_node.hh:299
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition BKE_node.hh:363
bool(* insert_link)(bNodeTree *ntree, bNode *node, bNodeLink *link)
Definition BKE_node.hh:309