Cleanup: Loop through socket listbase instead of array
The socket arrays will be removed when using the new socket builder. So instead we have to loop through the node outputs list.
This commit is contained in:
parent
741ed5fcd2
commit
90e5ce6ab5
|
@ -76,7 +76,8 @@ static int node_shader_gpu_attribute(GPUMaterial *mat,
|
|||
GPU_stack_link(mat, node, "node_attribute", in, out, cd_attr);
|
||||
|
||||
/* for each output. */
|
||||
for (int i = 0; sh_node_attribute_out[i].type != -1; i++) {
|
||||
int i;
|
||||
LISTBASE_FOREACH_INDEX (bNodeSocket *, sock, &node->outputs, i) {
|
||||
node_shader_gpu_bump_tex_coord(mat, node, &out[i].link);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat,
|
|||
GPU_stack_link(
|
||||
mat, node, "node_tex_coord", in, out, viewpos, worldnor, inv_obmat, texcofacs, orco, mtface);
|
||||
|
||||
/* for each output. */
|
||||
for (int i = 0; sh_node_tex_coord_out[i].type != -1; i++) {
|
||||
int i;
|
||||
LISTBASE_FOREACH_INDEX (bNodeSocket *, sock, &node->outputs, i) {
|
||||
node_shader_gpu_bump_tex_coord(mat, node, &out[i].link);
|
||||
/* Normalize some vectors after dFdx/dFdy offsets.
|
||||
* This is the case for interpolated, non linear functions.
|
||||
|
|
Loading…
Reference in New Issue