fix/workaround [#36694] Texture node groups tend to crash Blender a lot.

This commit is contained in:
Campbell Barton
2013-09-10 03:18:43 +00:00
parent 48c0c6ac02
commit c7f0344aae

View File

@@ -93,9 +93,12 @@ static void group_copy_inputs(bNode *gnode, bNodeStack **in, bNodeStack *gstack)
for (node = ngroup->nodes.first; node; node = node->next) {
if (node->type == NODE_GROUP_INPUT) {
for (sock = node->outputs.first, a = 0; sock; sock = sock->next, ++a) {
ns = node_get_socket_stack(gstack, sock);
if (ns)
copy_stack(ns, in[a]);
if (in[a]) { /* shouldn't need to check this [#36694] */
ns = node_get_socket_stack(gstack, sock);
if (ns) {
copy_stack(ns, in[a]);
}
}
}
}
}
@@ -114,9 +117,12 @@ static void group_copy_outputs(bNode *gnode, bNodeStack **out, bNodeStack *gstac
for (node = ngroup->nodes.first; node; node = node->next) {
if (node->type == NODE_GROUP_OUTPUT && (node->flag & NODE_DO_OUTPUT)) {
for (sock = node->inputs.first, a = 0; sock; sock = sock->next, ++a) {
ns = node_get_socket_stack(gstack, sock);
if (ns)
copy_stack(out[a], ns);
if (out[a]) { /* shouldn't need to check this [#36694] */
ns = node_get_socket_stack(gstack, sock);
if (ns) {
copy_stack(out[a], ns);
}
}
}
break; /* only one active output node */
}