Blender V4.3
node_texture_util.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2005 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "BKE_node.hh"
12
14
15#include "BLT_translation.hh"
16
17#include "RE_texture.h"
18
19struct bNodeThreadStack;
20
23 /* all float[3] */
24 const float *co;
25 float *dxt, *dyt;
26
27 int osatex;
30 short thread;
32 int cfra;
33
34 const MTex *mtex;
35};
36
37struct TexParams {
38 const float *co;
39 float *dxt, *dyt;
40 const float *previewco;
41 int cfra;
42 int osatex;
43
44 /* optional. we don't really want these here, but image
45 * textures need to do mapping & color correction */
46 const MTex *mtex;
47};
48
49using TexFn = void (*)(float *out, TexParams *params, bNode *node, bNodeStack **in, short thread);
50
59
61 const bNodeTree *ntree,
62 const char **r_disabled_hint);
63void tex_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass);
64
65void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread);
66void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread);
68
69void tex_output(bNode *node,
70 bNodeExecData *execdata,
71 bNodeStack **in,
72 bNodeStack *out,
74 TexCallData *data);
75
77
82 void *callerdata,
83 int thread);
84
86 bNodeTree *ntree,
87 bNodeInstanceKey parent_key);
#define MAX_SOCKET
Definition BKE_node.hh:29
OperationNode * node
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
static void texfn(float *result, TexParams *p, bNode *node, bNodeStack **in, MapFn map_inputs, short thread)
void tex_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
bNodeThreadStack * ntreeGetThreadStack(bNodeTreeExec *exec, int thread)
bool ntreeExecThreadNodes(bNodeTreeExec *exec, bNodeThreadStack *nts, void *callerdata, int thread)
void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread)
float tex_input_value(bNodeStack *in, TexParams *params, short thread)
bNodeTreeExec * ntreeTexBeginExecTree_internal(bNodeExecContext *context, bNodeTree *ntree, bNodeInstanceKey parent_key)
void ntreeTexEndExecTree_internal(bNodeTreeExec *exec)
bool tex_node_poll_default(const blender::bke::bNodeType *ntype, const bNodeTree *ntree, const char **r_disabled_hint)
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
void params_from_cdata(TexParams *out, TexCallData *in)
void ntreeReleaseThreadStack(bNodeThreadStack *nts)
void(*)(float *out, TexParams *params, bNode *node, bNodeStack **in, short thread) TexFn
void tex_output(bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *data)
const float * co
TexResult * target
const MTex * mtex
bNodePreview * preview
TexCallData * cdata
const MTex * mtex
const float * co
const float * previewco
Defines a node type.
Definition BKE_node.hh:218