[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51396] trunk/blender/intern/cycles/kernel /osl/nodes: style cleanup

Campbell Barton ideasman42 at gmail.com
Thu Oct 18 06:51:40 CEST 2012


Revision: 51396
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51396
Author:   campbellbarton
Date:     2012-10-18 04:51:37 +0000 (Thu, 18 Oct 2012)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/osl/nodes/node_brick_texture.osl
    trunk/blender/intern/cycles/kernel/osl/nodes/node_fresnel.osl
    trunk/blender/intern/cycles/kernel/osl/nodes/node_glass_bsdf.osl
    trunk/blender/intern/cycles/kernel/osl/nodes/node_layer_weight.osl
    trunk/blender/intern/cycles/kernel/osl/nodes/node_object_info.osl
    trunk/blender/intern/cycles/kernel/osl/nodes/node_particle_info.osl

Modified: trunk/blender/intern/cycles/kernel/osl/nodes/node_brick_texture.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/osl/nodes/node_brick_texture.osl	2012-10-17 23:09:12 UTC (rev 51395)
+++ trunk/blender/intern/cycles/kernel/osl/nodes/node_brick_texture.osl	2012-10-18 04:51:37 UTC (rev 51396)
@@ -41,8 +41,8 @@
 	rownum = (int)floor(p[1] / row_height);
 	
 	if (offset_frequency && squash_frequency) {
-		brick_width *= ((int)(rownum) % squash_frequency ) ? 1.0 : squash_amount; /* squash */
-		offset = ((int)(rownum) % offset_frequency ) ? 0 : (brick_width * offset_amount); /* offset */
+		brick_width *= ((int)(rownum) % squash_frequency) ? 1.0 : squash_amount;                /* squash */
+		offset       = ((int)(rownum) % offset_frequency) ? 0 : (brick_width * offset_amount);  /* offset */
 	}
 
 	bricknum = (int)floor((p[0] + offset) / brick_width);

Modified: trunk/blender/intern/cycles/kernel/osl/nodes/node_fresnel.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/osl/nodes/node_fresnel.osl	2012-10-17 23:09:12 UTC (rev 51395)
+++ trunk/blender/intern/cycles/kernel/osl/nodes/node_fresnel.osl	2012-10-18 04:51:37 UTC (rev 51396)
@@ -25,7 +25,7 @@
 	output float Fac = 0.0)
 {
 	float f = max(IOR, 1.0 + 1e-5);
-	float eta = backfacing()? 1.0 / f: f;
+	float eta = backfacing() ? 1.0 / f: f;
 	Fac = fresnel_dielectric(I, Normal, eta);
 }
 

Modified: trunk/blender/intern/cycles/kernel/osl/nodes/node_glass_bsdf.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/osl/nodes/node_glass_bsdf.osl	2012-10-17 23:09:12 UTC (rev 51395)
+++ trunk/blender/intern/cycles/kernel/osl/nodes/node_glass_bsdf.osl	2012-10-18 04:51:37 UTC (rev 51396)
@@ -28,7 +28,7 @@
 	output closure color BSDF = diffuse(Normal))
 {
 	float f = max(IOR, 1.0 + 1e-5);
-	float eta = backfacing()? 1.0 / f: f;
+	float eta = backfacing() ? 1.0 / f: f;
 	float Fr = fresnel_dielectric(I, Normal, eta);
 
 	if (distribution == "Sharp")

Modified: trunk/blender/intern/cycles/kernel/osl/nodes/node_layer_weight.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/osl/nodes/node_layer_weight.osl	2012-10-17 23:09:12 UTC (rev 51395)
+++ trunk/blender/intern/cycles/kernel/osl/nodes/node_layer_weight.osl	2012-10-18 04:51:37 UTC (rev 51396)
@@ -29,7 +29,7 @@
 
 	/* Fresnel */ 
 	float eta = max(1.0 - Blend, 1e-5);
-	eta = backfacing()? eta: 1.0 / eta;
+	eta = backfacing() ? eta : 1.0 / eta;
 	Fresnel = fresnel_dielectric(I, Normal, eta);
 
 	/* Facing */ 
@@ -37,7 +37,7 @@
 
 	if (blend != 0.5) {
 		blend = clamp(blend, 0.0, 1.0); 
-		blend = (blend < 0.5)? 2.0 * blend: 0.5 / (1.0 - blend);
+		blend = (blend < 0.5) ? 2.0 * blend : 0.5 / (1.0 - blend);
 
 		Facing = pow(Facing, blend);
 	}

Modified: trunk/blender/intern/cycles/kernel/osl/nodes/node_object_info.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/osl/nodes/node_object_info.osl	2012-10-17 23:09:12 UTC (rev 51395)
+++ trunk/blender/intern/cycles/kernel/osl/nodes/node_object_info.osl	2012-10-18 04:51:37 UTC (rev 51396)
@@ -19,15 +19,14 @@
 #include "stdosl.h"
 
 shader node_object_info(
-    output point Location = point(0.0, 0.0, 0.0),
-    output float ObjectIndex = 0.0,
-    output float MaterialIndex = 0.0,
-    output float Random = 0.0
-    )
+	output point Location = point(0.0, 0.0, 0.0),
+	output float ObjectIndex = 0.0,
+	output float MaterialIndex = 0.0,
+	output float Random = 0.0)
 {
-    getattribute("std::object_location", Location);
-    getattribute("std::object_index", ObjectIndex);
-    getattribute("std::material_index", MaterialIndex);
-    getattribute("std::object_random", Random);
+	getattribute("std::object_location", Location);
+	getattribute("std::object_index", ObjectIndex);
+	getattribute("std::material_index", MaterialIndex);
+	getattribute("std::object_random", Random);
 }
 

Modified: trunk/blender/intern/cycles/kernel/osl/nodes/node_particle_info.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/osl/nodes/node_particle_info.osl	2012-10-17 23:09:12 UTC (rev 51395)
+++ trunk/blender/intern/cycles/kernel/osl/nodes/node_particle_info.osl	2012-10-18 04:51:37 UTC (rev 51396)
@@ -25,15 +25,14 @@
     output point Location = point(0.0, 0.0, 0.0),
     output float Size = 0.0,
     output vector Velocity = point(0.0, 0.0, 0.0),
-    output vector AngularVelocity = point(0.0, 0.0, 0.0)
-    )
+    output vector AngularVelocity = point(0.0, 0.0, 0.0))
 {
-    getattribute("std::particle_index", Index);
-    getattribute("std::particle_age", Age);
-    getattribute("std::particle_lifetime", Lifetime);
-    getattribute("std::particle_location", Location);
-    getattribute("std::particle_size", Size);
-    getattribute("std::particle_velocity", Velocity);
-    getattribute("std::particle_angular_velocity", AngularVelocity);
+	getattribute("std::particle_index", Index);
+	getattribute("std::particle_age", Age);
+	getattribute("std::particle_lifetime", Lifetime);
+	getattribute("std::particle_location", Location);
+	getattribute("std::particle_size", Size);
+	getattribute("std::particle_velocity", Velocity);
+	getattribute("std::particle_angular_velocity", AngularVelocity);
 }
 




More information about the Bf-blender-cvs mailing list