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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-06-19 17:50:25 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-06-19 21:17:27 +0300
commit34a42788e702a4425afdff6fdbba7bdf549826be (patch)
tree0dd5b6fbde8cff36f9373964a061b6c624c837a7 /intern/cycles/render/graph.cpp
parentc87f7865b227d37b5c5be5a05a99e0eb50a3edc4 (diff)
Code refactor: small code simplification for Cycles constant folding.
Diffstat (limited to 'intern/cycles/render/graph.cpp')
-rw-r--r--intern/cycles/render/graph.cpp11
1 files changed, 11 insertions, 0 deletions
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) {