49 if (in[1] && in[1]->hasinput && !in[0]->hasinput) {
65 target->
tin = (target->
tr + target->
tg + target->
tb) / 3.0f;
69 if (in[1] && in[1]->hasinput) {
83 char new_name[
sizeof(tno->
name)];
87 const char *name = tno->
name;
94 for (; i; i = i->
next) {
100 if (new_name[0] ==
'\0') {
101 int len = strlen(name);
102 if (
len >= 4 && sscanf(name +
len - 4,
".%03d", &suffix) == 1) {
108 if (new_len > (
sizeof(tno->
name) - 1)) {
109 new_len = (
sizeof(tno->
name) - 1);
116 sprintf(new_name + new_len - 4,
".%03d", ++suffix);
119 if (new_name[0] !=
'\0') {
130 while (tnode->
prev) {
135 for (; tnode; tnode = tnode->
next) {
144 node->custom1 = index;
152 strcpy(tno->
name,
"Default");
#define NODE_CLASS_OUTPUT
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size)
void node_type_internal_links(struct bNodeType *ntype, void(*update_internal_links)(struct bNodeTree *, struct bNode *))
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))
void node_type_exec(struct bNodeType *ntype, NodeInitExecFunction init_exec_fn, NodeFreeExecFunction free_exec_fn, NodeExecFunction exec_fn)
void nodeRegisterType(struct bNodeType *ntype)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
void *(* MEM_callocN)(size_t len, const char *str)
static void assign_index(struct bNode *node)
static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
void register_node_type_tex_output(void)
static void unique_name(bNode *node)
static bNodeSocketTemplate inputs[]
static void init(bNodeTree *UNUSED(ntree), bNode *node)
static void exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **UNUSED(out))
void tex_do_preview(bNodePreview *preview, const float coord[2], const float col[4], bool do_manage)
void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread)
void tex_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
void params_from_cdata(TexParams *out, TexCallData *in)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
struct bNodePreview * preview
Compact definition of a node socket.