26 b.add_input<
decl::Float>(
N_(
"Scale")).default_value(1.0f).min(-10000.0f).max(10000.0f);
50 if (!
params.node_tree().typeinfo->validate_link(
59 if (item->name !=
nullptr && item->identifier[0] !=
'\0') {
81 return "vector_math_add";
83 return "vector_math_subtract";
85 return "vector_math_multiply";
87 return "vector_math_divide";
90 return "vector_math_cross";
92 return "vector_math_project";
94 return "vector_math_reflect";
96 return "vector_math_dot";
99 return "vector_math_distance";
101 return "vector_math_length";
103 return "vector_math_scale";
105 return "vector_math_normalize";
108 return "vector_math_snap";
110 return "vector_math_floor";
112 return "vector_math_ceil";
114 return "vector_math_modulo";
116 return "vector_math_fraction";
118 return "vector_math_absolute";
120 return "vector_math_minimum";
122 return "vector_math_maximum";
124 return "vector_math_wrap";
126 return "vector_math_sine";
128 return "vector_math_cosine";
130 return "vector_math_tangent";
132 return "vector_math_refract";
134 return "vector_math_faceforward";
136 return "vector_math_multiply_add";
149 if (name !=
nullptr) {
203 switch (
node->custom1) {
240 if (multi_fn !=
nullptr) {
250 if (multi_fn !=
nullptr) {
260 if (multi_fn !=
nullptr) {
270 if (multi_fn !=
nullptr) {
280 if (multi_fn !=
nullptr) {
290 if (multi_fn !=
nullptr) {
300 if (multi_fn !=
nullptr) {
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
void node_type_update(struct bNodeType *ntype, void(*updatefunc)(struct bNodeTree *ntree, struct bNode *node))
void nodeSetSocketAvailability(struct bNodeTree *ntree, struct bNodeSocket *sock, bool is_available)
struct bNodeSocket * nodeFindSocket(const struct bNode *node, eNodeSocketInOut in_out, const char *identifier)
#define NODE_CLASS_OP_VECTOR
void nodeRegisterType(struct bNodeType *ntype)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
@ NODE_VECTOR_MATH_NORMALIZE
@ NODE_VECTOR_MATH_LENGTH
@ NODE_VECTOR_MATH_CROSS_PRODUCT
@ NODE_VECTOR_MATH_MODULO
@ NODE_VECTOR_MATH_COSINE
@ NODE_VECTOR_MATH_REFLECT
@ NODE_VECTOR_MATH_REFRACT
@ NODE_VECTOR_MATH_DOT_PRODUCT
@ NODE_VECTOR_MATH_ABSOLUTE
@ NODE_VECTOR_MATH_DIVIDE
@ NODE_VECTOR_MATH_TANGENT
@ NODE_VECTOR_MATH_DISTANCE
@ NODE_VECTOR_MATH_FRACTION
@ NODE_VECTOR_MATH_PROJECT
@ NODE_VECTOR_MATH_MULTIPLY
@ NODE_VECTOR_MATH_MAXIMUM
@ NODE_VECTOR_MATH_FACEFORWARD
@ NODE_VECTOR_MATH_SUBTRACT
@ NODE_VECTOR_MATH_MULTIPLY_ADD
@ NODE_VECTOR_MATH_MINIMUM
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum SH_NODE_VECTOR_MATH
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
constexpr const char * c_str() const
void set_matching_fn(const MultiFunction *fn)
NodeVectorMathOperation mode
void operator()(LinkSearchOpParams ¶ms)
static void sh_node_vector_math_build_multi_function(NodeMultiFunctionBuilder &builder)
static const fn::MultiFunction * get_multi_function(bNode &node)
static void sh_node_vector_math_gather_link_searches(GatherLinkSearchOpParams ¶ms)
static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static int gpu_shader_vector_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static void node_shader_update_vector_math(bNodeTree *ntree, bNode *node)
static void sh_node_vector_math_declare(NodeDeclarationBuilder &b)
static const char * gpu_shader_get_name(int mode)
bool try_dispatch_float_math_fl3_fl3_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
bool try_dispatch_float_math_fl3_to_fl(const NodeVectorMathOperation operation, Callback &&callback)
bool try_dispatch_float_math_fl3_fl3_to_fl(const NodeVectorMathOperation operation, Callback &&callback)
bool try_dispatch_float_math_fl3_fl_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
bool try_dispatch_float_math_fl3_fl3_fl_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
bool try_dispatch_float_math_fl3_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
bool try_dispatch_float_math_fl3_fl3_fl3_to_fl3(const NodeVectorMathOperation operation, Callback &&callback)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void sh_fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void register_node_type_sh_vect_math()
void node_sock_label_clear(bNodeSocket *sock)
void node_sock_label(bNodeSocket *sock, const char *name)
void node_vector_math_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *label, int maxlen)
const EnumPropertyItem rna_enum_node_vec_math_items[]
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
void(* labelfunc)(const struct bNodeTree *ntree, const struct bNode *node, char *label, int maxlen)
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
NodeMultiFunctionBuildFunction build_multi_function
NodeDeclareFunction declare
StringRefNull title_case_name