Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/node_shader_util.c
| Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | for (node = ntree->nodes.first; node; node = node->next) { | ||||
| return tnode; | return tnode; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return inactivenode; | return inactivenode; | ||||
| } | } | ||||
| void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs) | void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, bNode *output_node) | ||||
| { | { | ||||
| bNodeExec *nodeexec; | bNodeExec *nodeexec; | ||||
| bNode *node; | bNode *node; | ||||
| int n; | int n; | ||||
| bNodeStack *stack; | bNodeStack *stack; | ||||
| bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ | bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ | ||||
| bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ | bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ | ||||
| GPUNodeStack gpuin[MAX_SOCKET + 1], gpuout[MAX_SOCKET + 1]; | GPUNodeStack gpuin[MAX_SOCKET + 1], gpuout[MAX_SOCKET + 1]; | ||||
| bool do_it; | bool do_it; | ||||
| stack = exec->stack; | stack = exec->stack; | ||||
| for (n = 0, nodeexec = exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { | for (n = 0, nodeexec = exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { | ||||
| node = nodeexec->node; | node = nodeexec->node; | ||||
| do_it = false; | do_it = false; | ||||
| /* for groups, only execute outputs for edited group */ | /* for groups, only execute outputs for edited group */ | ||||
| if (node->typeinfo->nclass == NODE_CLASS_OUTPUT) { | if (node->typeinfo->nclass == NODE_CLASS_OUTPUT) { | ||||
| if (do_outputs && (node->flag & NODE_DO_OUTPUT)) | if ((output_node != NULL) && (node == output_node)) | ||||
| do_it = true; | do_it = true; | ||||
| } | } | ||||
| else { | else { | ||||
| do_it = true; | do_it = true; | ||||
| } | } | ||||
| if (do_it) { | if (do_it) { | ||||
| if (node->typeinfo->gpufunc) { | if (node->typeinfo->gpufunc) { | ||||
| Show All 35 Lines | |||||