From e1a34f22d7c16d8c54e95644e054e2aeeefcbc90 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Fri, 4 Oct 2013 08:27:54 +0000 Subject: 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. --- source/blender/blenkernel/intern/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/node.c') 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) -- cgit v1.2.3