Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/texture/nodes/node_texture_common.cc
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | for (node = static_cast<bNode *>(ngroup->nodes.first); node; node = node->next) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Copy internal results to the external outputs. | /* Copy internal results to the external outputs. | ||||
| */ | */ | ||||
| static void group_copy_outputs(bNode *gnode, bNodeStack **out, bNodeStack *gstack) | static void group_copy_outputs(bNode *gnode, bNodeStack **out, bNodeStack *gstack) | ||||
| { | { | ||||
| bNodeTree *ngroup = (bNodeTree *)gnode->id; | if (!gnode->id) { | ||||
| bNode *node; | return; | ||||
| bNodeSocket *sock; | |||||
| bNodeStack *ns; | |||||
| int a; | |||||
| for (node = static_cast<bNode *>(ngroup->nodes.first); node; node = node->next) { | |||||
| if (node->type == NODE_GROUP_OUTPUT && (node->flag & NODE_DO_OUTPUT)) { | |||||
| for (sock = static_cast<bNodeSocket *>(node->inputs.first), a = 0; sock; | |||||
| sock = sock->next, a++) { | |||||
| if (out[a]) { /* shouldn't need to check this T36694. */ | |||||
| ns = node_get_socket_stack(gstack, sock); | |||||
| if (ns) { | |||||
| copy_stack(out[a], ns); | |||||
| } | } | ||||
| const bNodeTree &ngroup = *reinterpret_cast<bNodeTree *>(gnode->id); | |||||
| ngroup.ensure_topology_cache(); | |||||
| const bNode *group_output_node = ngroup.group_output_node(); | |||||
| if (!group_output_node) { | |||||
| return; | |||||
| } | } | ||||
| int a = 0; | |||||
| LISTBASE_FOREACH_INDEX (bNodeSocket *, socket, &group_output_node->inputs, a) { | |||||
| if (!out[a]) { | |||||
| /* shouldn't need to check this T36694. */ | |||||
| continue; | |||||
| } | } | ||||
| break; /* only one active output node */ | |||||
| bNodeStack *ns = node_get_socket_stack(gstack, socket); | |||||
| if (ns) { | |||||
| copy_stack(out[a], ns); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void group_execute(void *data, | static void group_execute(void *data, | ||||
| int thread, | int thread, | ||||
| struct bNode *node, | struct bNode *node, | ||||
| bNodeExecData *execdata, | bNodeExecData *execdata, | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||