From 34a42788e702a4425afdff6fdbba7bdf549826be Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 19 Jun 2016 16:50:25 +0200 Subject: Code refactor: small code simplification for Cycles constant folding. --- intern/cycles/render/graph.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'intern/cycles/render/graph.cpp') diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index 9210221a261..a1b992a2c31 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -126,6 +126,17 @@ ShaderOutput *ShaderNode::output(ustring name) return NULL; } +bool ShaderNode::all_inputs_constant() const +{ + foreach(ShaderInput *input, inputs) { + if(input->link) { + return false; + } + } + + return true; +} + void ShaderNode::attributes(Shader *shader, AttributeRequestSet *attributes) { foreach(ShaderInput *input, inputs) { -- cgit v1.2.3