44 const char **r_disabled_hint)
47 *r_disabled_hint =
"Not a texture node tree";
54 struct bNodeType *ntype,
int type,
const char *name,
short nclass,
short flag)
84 memcpy(out, in->
vec, sz *
sizeof(
float));
97 out[1] = out[2] = out[0];
102 out[0] = out[0] * 0.5f + 0.5f;
103 out[1] = out[1] * 0.5f + 0.5f;
104 out[2] = out[2] * 0.5f + 0.5f;
128 const float coord[2],
133 int xs = ((coord[0] + 1.0f) * 0.5f) * preview->
xsize;
134 int ys = ((coord[1] + 1.0f) * 0.5f) * preview->
ysize;
void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
void BKE_node_preview_set_pixel(struct bNodePreview *preview, const float col[4], int x, int y, bool do_manage)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void *(* MEM_mallocN)(size_t len, const char *str)
static void texfn(float *result, TexParams *p, bNode *node, bNodeStack **in, char is_normal, MapFn map_inputs, short thread)
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)
float tex_input_value(bNodeStack *in, TexParams *params, short thread)
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
static void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread)
bool tex_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree, const char **r_disabled_hint)
void tex_output(bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
static void tex_input(float *out, int sz, bNodeStack *in, TexParams *params, short thread)
void ntreeTexCheckCyclics(struct bNodeTree *ntree)
void params_from_cdata(TexParams *out, TexCallData *in)
void(* TexFn)(float *out, TexParams *params, bNode *node, bNodeStack **in, short thread)
void node_insert_link_default(bNodeTree *ntree, bNode *node, bNodeLink *link)
void node_update_internal_links_default(bNodeTree *ntree, bNode *node)
bNodeStack * in[MAX_SOCKET]
struct bNodeTree * nodetree
struct bNodePreview * preview
bool(* poll)(struct bNodeType *ntype, struct bNodeTree *nodetree, const char **r_disabled_hint)
void(* update_internal_links)(struct bNodeTree *, struct bNode *node)
void(* insert_link)(struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link)