Blender  V3.3
node_fn_input_bool.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include "node_function_util.hh"
4 
5 #include "BLI_hash.h"
6 
7 #include "UI_interface.h"
8 #include "UI_resources.h"
9 
11 
13 {
14  b.add_output<decl::Bool>(N_("Boolean"));
15 }
16 
18 {
19  uiLayout *col = uiLayoutColumn(layout, true);
20  uiItemR(col, ptr, "boolean", UI_ITEM_R_EXPAND, IFACE_("Value"), ICON_NONE);
21 }
22 
24 {
25  bNode &bnode = builder.node();
26  NodeInputBool *node_storage = static_cast<NodeInputBool *>(bnode.storage);
28 }
29 
31 {
32  NodeInputBool *data = MEM_cnew<NodeInputBool>(__func__);
33  node->storage = data;
34 }
35 
36 } // namespace blender::nodes::node_fn_input_bool_cc
37 
39 {
40  namespace file_ns = blender::nodes::node_fn_input_bool_cc;
41 
42  static bNodeType ntype;
43 
44  fn_node_type_base(&ntype, FN_NODE_INPUT_BOOL, "Boolean", 0);
48  &ntype, "NodeInputBool", node_free_standard_storage, node_copy_standard_storage);
51  nodeRegisterType(&ntype);
52 }
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
Definition: node.cc:4390
#define FN_NODE_INPUT_BOOL
Definition: BKE_node.h:1534
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
Definition: node.cc:4426
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define UNUSED(x)
#define IFACE_(msgid)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
@ UI_ITEM_R_EXPAND
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
OperationNode * node
bNodeTree * ntree
uint col
static void fn_node_input_bool_build_multi_function(NodeMultiFunctionBuilder &builder)
static void fn_node_input_bool_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void fn_node_input_bool_init(bNodeTree *UNUSED(ntree), bNode *node)
static void fn_node_input_bool_declare(NodeDeclarationBuilder &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_fn_input_bool()
void fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
Definition: node_util.c:55
void node_free_standard_storage(bNode *node)
Definition: node_util.c:43
Defines a node type.
Definition: BKE_node.h:226
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
Definition: BKE_node.h:244
NodeMultiFunctionBuildFunction build_multi_function
Definition: BKE_node.h:313
NodeDeclareFunction declare
Definition: BKE_node.h:324
void * storage
#define N_(msgid)
PointerRNA * ptr
Definition: wm_files.c:3480