Blender  V3.3
node_fn_input_vector.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::Vector>(N_("Vector"));
15 }
16 
18 {
19  uiLayout *col = uiLayoutColumn(layout, true);
20  uiItemR(col, ptr, "vector", UI_ITEM_R_EXPAND, "", ICON_NONE);
21 }
22 
24 {
25  bNode &bnode = builder.node();
26  NodeInputVector *node_storage = static_cast<NodeInputVector *>(bnode.storage);
27  float3 vector(node_storage->vector);
29 }
30 
32 {
33  NodeInputVector *data = MEM_cnew<NodeInputVector>(__func__);
34  node->storage = data;
35 }
36 
37 } // namespace blender::nodes::node_fn_input_vector_cc
38 
40 {
41  namespace file_ns = blender::nodes::node_fn_input_vector_cc;
42 
43  static bNodeType ntype;
44 
45  fn_node_type_base(&ntype, FN_NODE_INPUT_VECTOR, "Vector", 0);
49  &ntype, "NodeInputVector", node_free_standard_storage, node_copy_standard_storage);
52  nodeRegisterType(&ntype);
53 }
#define FN_NODE_INPUT_VECTOR
Definition: BKE_node.h:1522
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
Definition: node.cc:4390
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)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
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_vector_init(bNodeTree *UNUSED(ntree), bNode *node)
static void fn_node_input_vector_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void fn_node_input_vector_declare(NodeDeclarationBuilder &b)
static void fn_node_input_vector_build_multi_function(NodeMultiFunctionBuilder &builder)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_fn_input_vector()
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