diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-04 12:27:54 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-04 12:27:54 +0400 |
commit | e1a34f22d7c16d8c54e95644e054e2aeeefcbc90 (patch) | |
tree | 0742bd8ac180ff9bd190ca14c718c2e547c4a6b9 /source/blender/blenkernel/intern/node.c | |
parent | ac606a704702af5719cc6c5b62de028d30036769 (diff) |
Fix #36939, Objects with nodes appear in gray in viewport, using Solid shade, and the Blender Engine (or Game Engine).
The "active ID node" concept has become slightly more complex with pynodes. To find the active material or other ID links in a node tree recursively requires a hash key based on the "parent" tree of the
current node group. To avoid returning NULL in case this key is not yet initialized (i.e. ID node has not been activated yet), just accept 0 key as well for the base node tree.
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index e296e97fb11..c0df306a3fa 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -2321,7 +2321,7 @@ bNode *nodeGetActive(bNodeTree *ntree) static bNode *node_get_active_id_recursive(bNodeInstanceKey active_key, bNodeInstanceKey parent_key, bNodeTree *ntree, short idtype) { - if (parent_key.value == active_key.value) { + if (parent_key.value == active_key.value || active_key.value == 0) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) if (node->id && GS(node->id->name) == idtype) |