Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2021-03-05 19:35:25 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2021-03-05 19:35:35 +0300
commited84161529527274852d5665f93a7d8b7cd1be9c (patch)
tree3d8b31716c458466effd54d9bdf0bd85bfb84953 /source/blender/nodes
parentf882bee4311d22fef01f33d95a6386a6ee2bef02 (diff)
Cleanup: Rename func occurences to _fn
Use _fn as a suffix for callbacks.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/intern/node_exec.c14
-rw-r--r--source/blender/nodes/intern/node_exec.h2
-rw-r--r--source/blender/nodes/shader/node_shader_util.c4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_environment.c10
4 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
index 0d46119ab60..6207a1bf024 100644
--- a/source/blender/nodes/intern/node_exec.c
+++ b/source/blender/nodes/intern/node_exec.c
@@ -218,7 +218,7 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context,
/* prepare all nodes for execution */
for (n = 0, nodeexec = exec->nodeexec; n < totnodes; n++, nodeexec++) {
node = nodeexec->node = nodelist[n];
- nodeexec->freeexecfunc = node->typeinfo->freeexecfunc;
+ nodeexec->free_exec_fn = node->typeinfo->free_exec_fn;
/* tag inputs */
for (sock = node->inputs.first; sock; sock = sock->next) {
@@ -242,8 +242,8 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context,
nodeexec->data.preview = context->previews ?
BKE_node_instance_hash_lookup(context->previews, nodekey) :
NULL;
- if (node->typeinfo->initexecfunc) {
- nodeexec->data.data = node->typeinfo->initexecfunc(context, node, nodekey);
+ if (node->typeinfo->init_exec_fn) {
+ nodeexec->data.data = node->typeinfo->init_exec_fn(context, node, nodekey);
}
}
@@ -264,8 +264,8 @@ void ntree_exec_end(bNodeTreeExec *exec)
}
for (n = 0, nodeexec = exec->nodeexec; n < exec->totnodes; n++, nodeexec++) {
- if (nodeexec->freeexecfunc) {
- nodeexec->freeexecfunc(nodeexec->data.data);
+ if (nodeexec->free_exec_fn) {
+ nodeexec->free_exec_fn(nodeexec->data.data);
}
}
@@ -323,8 +323,8 @@ bool ntreeExecThreadNodes(bNodeTreeExec *exec, bNodeThreadStack *nts, void *call
* If the mute func is not set, assume the node should never be muted,
* and hence execute it!
*/
- if (node->typeinfo->execfunc && !(node->flag & NODE_MUTED)) {
- node->typeinfo->execfunc(callerdata, thread, node, &nodeexec->data, nsin, nsout);
+ if (node->typeinfo->exec_fn && !(node->flag & NODE_MUTED)) {
+ node->typeinfo->exec_fn(callerdata, thread, node, &nodeexec->data, nsin, nsout);
}
}
}
diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h
index 806dd10d9bf..de7cbb8cedb 100644
--- a/source/blender/nodes/intern/node_exec.h
+++ b/source/blender/nodes/intern/node_exec.h
@@ -48,7 +48,7 @@ typedef struct bNodeExec {
bNodeExecData data;
/** Free function, stored in exec itself to avoid dangling node pointer access. */
- NodeFreeExecFunction freeexecfunc;
+ NodeFreeExecFunction free_exec_fn;
} bNodeExec;
/* Execution Data for each instance of node tree execution */
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index 25d6aef69e5..1a2405e021f 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -257,11 +257,11 @@ void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, bNode *output_node
}
if (do_it) {
- if (node->typeinfo->gpufunc) {
+ if (node->typeinfo->gpu_fn) {
node_get_stack(node, stack, nsin, nsout);
gpu_stack_from_data_list(gpuin, &node->inputs, nsin);
gpu_stack_from_data_list(gpuout, &node->outputs, nsout);
- if (node->typeinfo->gpufunc(mat, node, &nodeexec->data, gpuin, gpuout)) {
+ if (node->typeinfo->gpu_fn(mat, node, &nodeexec->data, gpuin, gpuout)) {
data_from_gpu_stack_list(&node->outputs, nsout, gpuout);
}
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
index 41c978e75ba..26a1db1f3a6 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
@@ -90,7 +90,7 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat,
sampler &= ~GPU_SAMPLER_REPEAT;
}
- const char *gpufunc;
+ const char *gpu_fn;
static const char *names[] = {
"node_tex_image_linear",
"node_tex_image_cubic",
@@ -98,19 +98,19 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat,
switch (tex->interpolation) {
case SHD_INTERP_LINEAR:
- gpufunc = names[0];
+ gpu_fn = names[0];
break;
case SHD_INTERP_CLOSEST:
sampler &= ~(GPU_SAMPLER_FILTER | GPU_SAMPLER_MIPMAP);
- gpufunc = names[0];
+ gpu_fn = names[0];
break;
default:
- gpufunc = names[1];
+ gpu_fn = names[1];
break;
}
/* Sample texture with correct interpolation. */
- GPU_link(mat, gpufunc, in[0].link, GPU_image(mat, ima, iuser, sampler), &out[0].link, &outalpha);
+ GPU_link(mat, gpu_fn, in[0].link, GPU_image(mat, ima, iuser, sampler), &out[0].link, &outalpha);
if (out[0].hasoutput) {
if (ELEM(ima->alpha_mode, IMA_ALPHA_IGNORE, IMA_ALPHA_CHANNEL_PACKED) ||