[Bf-blender-cvs] [cb983aabacf] soc-2018-hair-shader: Cleanup: missing parentheses

L. E. Segovia noreply at git.blender.org
Sat Jun 2 21:35:42 CEST 2018


Commit: cb983aabacf870a478624f2f1af0ed50ec730005
Author: L. E. Segovia
Date:   Sat Jun 2 19:27:53 2018 +0000
Branches: soc-2018-hair-shader
https://developer.blender.org/rBcb983aabacf870a478624f2f1af0ed50ec730005

Cleanup: missing parentheses

===================================================================

M	intern/cycles/kernel/svm/svm_types.h
M	source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c

===================================================================

diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index 17a90a60a8d..fe482c23f50 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -479,7 +479,7 @@ typedef enum ClosureType {
 /* watch this, being lazy with memory usage */
 #define CLOSURE_IS_BSDF(type) (type <= CLOSURE_BSDF_TRANSPARENT_ID)
 #define CLOSURE_IS_BSDF_DIFFUSE(type) (type >= CLOSURE_BSDF_DIFFUSE_ID && type <= CLOSURE_BSDF_DIFFUSE_TOON_ID)
-#define CLOSURE_IS_BSDF_GLOSSY(type) (type >= CLOSURE_BSDF_REFLECTION_ID && type <= CLOSURE_BSDF_HAIR_REFLECTION_ID || type == CLOSURE_BSDF_HAIR_PRINCIPLED_ID)
+#define CLOSURE_IS_BSDF_GLOSSY(type) (type >= CLOSURE_BSDF_REFLECTION_ID && type <= CLOSURE_BSDF_HAIR_REFLECTION_ID || (type == CLOSURE_BSDF_HAIR_PRINCIPLED_ID))
 #define CLOSURE_IS_BSDF_TRANSMISSION(type) (type >= CLOSURE_BSDF_TRANSLUCENT_ID && type <= CLOSURE_BSDF_HAIR_TRANSMISSION_ID)
 #define CLOSURE_IS_BSDF_BSSRDF(type) (type == CLOSURE_BSDF_BSSRDF_ID || type == CLOSURE_BSDF_BSSRDF_PRINCIPLED_ID)
 #define CLOSURE_IS_BSDF_SINGULAR(type) (type == CLOSURE_BSDF_REFLECTION_ID || \
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c
index 2b0d05f7115..466243ca65e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c
@@ -83,7 +83,7 @@ static void node_shader_update_hair_principled(bNodeTree *UNUSED(ntree), bNode *
 			}
 		}
 		else if (STREQ(sock->name, "Absorption Coefficient")) {
-			if (parametrization == SHD_PRINCIPLED_HAIR_PHYSICAL || parametrization == SHD_PRINCIPLED_HAIR_DIRECT_ABSORPTION){
+			if ((parametrization == SHD_PRINCIPLED_HAIR_PHYSICAL) || (parametrization == SHD_PRINCIPLED_HAIR_DIRECT_ABSORPTION)){
 				sock->flag &= ~SOCK_UNAVAIL;
 			}
 			else {



More information about the Bf-blender-cvs mailing list