diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-16 18:13:43 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-16 18:13:43 +0400 |
commit | 004cb6ba1b96e3a4857f08255f2be9fe873b69fb (patch) | |
tree | 0b1502b2e43e36c66fb280c89f46a125591f76fc /source/blender/nodes | |
parent | ed5815fc7fb6be111fca613d0500418c4955e217 (diff) |
Fix #29160: material node "Texture" didn't use default texture coordinates
anymore when nothing was connected to the socket.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_texture.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c index dbf9fdbdb7e..c26cf2451df 100644 --- a/source/blender/nodes/shader/nodes/node_shader_texture.c +++ b/source/blender/nodes/shader/nodes/node_shader_texture.c @@ -51,6 +51,7 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b if(data && node->id) { ShadeInput *shi= ((ShaderCallData *)data)->shi; TexResult texres; + bNodeSocket *sock_vector= node->inputs.first; float vec[3], nor[3]={0.0f, 0.0f, 0.0f}; int retval; short which_output = node->custom1; @@ -63,7 +64,8 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b texres.nor= nor; texres.tr= texres.tg= texres.tb= 0.0f; - if(in[0]->hasinput) { + /* don't use in[0]->hasinput, see material node for explanation */ + if(sock_vector->link) { nodestack_get_vec(vec, SOCK_VECTOR, in[0]); if(in[0]->datatype==NS_OSA_VECTORS) { |