Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-02-24 16:21:43 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-02-24 16:21:43 +0400
commitb5aef37c27f5fb2a4bb4227253f81d886ddd796c (patch)
tree3d85fb50364dfc6d556070f7018dc290c46f4fca /source/blender/nodes
parent8d023c1ad0a1ac27ecfb20c65a61394363bbbb34 (diff)
Fix T38798: Can get stuck in world nodes when switching from Cycles to
BI. The shaderfrom setting in the node editor only makes sense for "new" shading nodes (cycles), otherwise it should be ignored and default to SNODE_SHADER_OBJECT.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index 2186eb7c226..53f97e0d36c 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -79,7 +79,7 @@ static void shader_get_from_context(const bContext *C, bNodeTreeType *UNUSED(tre
Scene *scene = CTX_data_scene(C);
Object *ob = OBACT;
- if (snode->shaderfrom == SNODE_SHADER_OBJECT) {
+ if (!BKE_scene_use_new_shading_nodes(scene) || snode->shaderfrom == SNODE_SHADER_OBJECT) {
if (ob) {
*r_from = &ob->id;
if (ob->type == OB_LAMP) {