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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-10-24 13:26:12 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-10-24 13:26:12 +0300
commit48997d2e40a74a83fb9edfb9de0999139392f634 (patch)
treebb968328b736dd1f9f5433061d8cfbd10fb6ef9b /intern/cycles/render/nodes.cpp
parent3f292596769d699c8347be075a6d4bff8fffd556 (diff)
Cycles: Cleanup, style
Diffstat (limited to 'intern/cycles/render/nodes.cpp')
-rw-r--r--intern/cycles/render/nodes.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 7ea52b28b9c..3b4aa389c13 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -2378,8 +2378,9 @@ void EmissionNode::constant_fold(const ConstantFolder& folder)
ShaderInput *color_in = input("Color");
ShaderInput *strength_in = input("Strength");
- if ((!color_in->link && color == make_float3(0.0f, 0.0f, 0.0f)) ||
- (!strength_in->link && strength == 0.0f)) {
+ if((!color_in->link && color == make_float3(0.0f, 0.0f, 0.0f)) ||
+ (!strength_in->link && strength == 0.0f))
+ {
folder.discard();
}
}
@@ -2430,8 +2431,9 @@ void BackgroundNode::constant_fold(const ConstantFolder& folder)
ShaderInput *color_in = input("Color");
ShaderInput *strength_in = input("Strength");
- if ((!color_in->link && color == make_float3(0.0f, 0.0f, 0.0f)) ||
- (!strength_in->link && strength == 0.0f)) {
+ if((!color_in->link && color == make_float3(0.0f, 0.0f, 0.0f)) ||
+ (!strength_in->link && strength == 0.0f))
+ {
folder.discard();
}
}
@@ -4864,8 +4866,9 @@ void CurvesNode::constant_fold(const ConstantFolder& folder, ShaderInput *value_
/* evaluate fully constant node */
if(folder.all_inputs_constant()) {
- if (curves.size() == 0)
+ if(curves.size() == 0) {
return;
+ }
float3 pos = (value - make_float3(min_x, min_x, min_x)) / (max_x - min_x);
float3 result;
@@ -5140,7 +5143,7 @@ OSLNode* OSLNode::create(size_t num_inputs, const OSLNode *from)
char *node_memory = (char*) operator new(node_size + inputs_size);
memset(node_memory, 0, node_size + inputs_size);
- if (!from) {
+ if(!from) {
return new(node_memory) OSLNode();
}
else {