diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-12-15 19:01:56 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-12-15 19:01:56 +0300 |
commit | 5b331150709616fc5aee9c1af228d48175032ea0 (patch) | |
tree | 057115774a6e232aff3ff88cdb8f6c9d94a56554 /intern/cycles/render/graph.cpp | |
parent | baaf10cb264e530549dca7de2d77142092daa40d (diff) |
Cycles: Fix wrong assert failure happening after recent de-duplicate
This is actually intended behavior to return NULL when the socket is not
found. It's used in certain BSDF nodes to query whether some inputs exists
or not.
Perhaps we can be more explicit here and have dedicated logic to query
socket existance and keep assert in place.
In any case, even if we lost assert() for the constant fold now it's
still somewhat better than duplicated code. Perhaps.
Diffstat (limited to 'intern/cycles/render/graph.cpp')
-rw-r--r-- | intern/cycles/render/graph.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index e177cd54c9e..7bffb29c77c 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -100,7 +100,7 @@ ShaderInput *ShaderNode::input(const char *name) if(strcmp(socket->name, name) == 0) return socket; } - assert(!"Requested shader input does not exist"); + return NULL; } @@ -109,7 +109,7 @@ ShaderOutput *ShaderNode::output(const char *name) foreach(ShaderOutput *socket, outputs) if(strcmp(socket->name, name) == 0) return socket; - assert(!"Requested shader output does not exist"); + return NULL; } |