[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60669] trunk/blender: style cleanup

Campbell Barton ideasman42 at gmail.com
Thu Oct 10 19:28:01 CEST 2013


Revision: 60669
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60669
Author:   campbellbarton
Date:     2013-10-10 17:28:01 +0000 (Thu, 10 Oct 2013)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/shaders/node_hair_bsdf.osl
    trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl
    trunk/blender/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
    trunk/blender/source/blender/editors/sculpt_paint/paint_cursor.c
    trunk/blender/source/blender/makesrna/intern/rna_scene.c

Modified: trunk/blender/intern/cycles/kernel/shaders/node_hair_bsdf.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/shaders/node_hair_bsdf.osl	2013-10-10 17:14:04 UTC (rev 60668)
+++ trunk/blender/intern/cycles/kernel/shaders/node_hair_bsdf.osl	2013-10-10 17:28:01 UTC (rev 60669)
@@ -19,8 +19,8 @@
 #include "stdosl.h"
 
 shader node_hair_bsdf(
-    color Color = 0.8,
-    string component = "Reflection",
+	color Color = 0.8,
+	string component = "Reflection",
 	float Offset = 0.0,
 	float RoughnessU = 0.1,
 	float RoughnessV = 1.0,
@@ -28,29 +28,30 @@
 	output closure color BSDF = 0)
 {
 	float IsStrand;
-	float roughnessh = clamp(RoughnessU, 0.001,1.0);
-	float roughnessv = clamp(RoughnessV, 0.001,1.0);
+	float roughnessh = clamp(RoughnessU, 0.001, 1.0);
+	float roughnessv = clamp(RoughnessV, 0.001, 1.0);
 	getattribute("geom:is_curve", IsStrand);
 
-    if (!IsStrand) {
-		if (backfacing())
-        	BSDF = transparent();
-    	else {
-    		if (component == "Reflection")
-    			BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
-    		else
-    			BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
+	if (!IsStrand) {
+		if (backfacing()) {
+			BSDF = transparent();
 		}
+		else {
+			if (component == "Reflection")
+				BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
+			else
+				BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
+		}
 	}
-    else {
-		if (backfacing())
-        	BSDF = transparent();
-    	else {
-    		if (component == "Reflection")
-    			BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, dPdu, -Offset);
-    		else
-    			BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, dPdu, -Offset);
+	else {
+		if (backfacing()) {
+			BSDF = transparent();
 		}
+		else {
+			if (component == "Reflection")
+				BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, dPdu, -Offset);
+			else
+				BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, dPdu, -Offset);
+		}
 	}
 }
-

Modified: trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl	2013-10-10 17:14:04 UTC (rev 60668)
+++ trunk/blender/intern/cycles/kernel/shaders/node_sky_texture.osl	2013-10-10 17:28:01 UTC (rev 60669)
@@ -44,8 +44,8 @@
 }
 
 color sky_radiance_old(normal dir,
-                   float sunphi, float suntheta, color radiance,
-                   float config_x[9], float config_y[9], float config_z[9])
+                       float sunphi, float suntheta, color radiance,
+                       float config_x[9], float config_y[9], float config_z[9])
 {
 	/* convert vector to spherical coordinates */
 	vector spherical = sky_spherical_coordinates(dir);
@@ -76,7 +76,7 @@
 	
 	float expM = exp(config[4] * gamma);
 	float rayM = cgamma * cgamma;
-	float mieM = (1.0 + rayM) / pow((1.0 + config[8]*config[8] - 2.0*config[8]*cgamma), 1.5);
+	float mieM = (1.0 + rayM) / pow((1.0 + config[8] * config[8] - 2.0 * config[8] * cgamma), 1.5);
 	float zenith = sqrt(ctheta);
 
 	return (1.0 + config[0] * exp(config[1] / (ctheta + 0.01))) *
@@ -84,8 +84,8 @@
 }
 
 color sky_radiance_new(normal dir,
-                   float sunphi, float suntheta, color radiance,
-                   float config_x[9], float config_y[9], float config_z[9])
+                       float sunphi, float suntheta, color radiance,
+                       float config_x[9], float config_y[9], float config_z[9])
 {
 	/* convert vector to spherical coordinates */
 	vector spherical = sky_spherical_coordinates(dir);
@@ -104,7 +104,7 @@
 	float z = sky_radiance_internal(config_z, theta, gamma) * radiance[2];
 
 	/* convert to RGB and adjust strength */
-	return xyz_to_rgb(x, y, z) * (M_2PI/683);
+	return xyz_to_rgb(x, y, z) * (M_2PI / 683);
 }
 
 shader node_sky_texture(

Modified: trunk/blender/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
===================================================================
--- trunk/blender/intern/cycles/kernel/shaders/node_subsurface_scattering.osl	2013-10-10 17:14:04 UTC (rev 60668)
+++ trunk/blender/intern/cycles/kernel/shaders/node_subsurface_scattering.osl	2013-10-10 17:28:01 UTC (rev 60669)
@@ -26,7 +26,7 @@
 	normal Normal = N,
 	output closure color BSSRDF = 0)
 {
-	if(Falloff == "Gaussian")
+	if (Falloff == "Gaussian")
 		BSSRDF = Color * bssrdf_gaussian(N, Scale * Radius, TextureBlur);
 	else
 		BSSRDF = Color * bssrdf_cubic(N, Scale * Radius, TextureBlur, Sharpness);

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_cursor.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_cursor.c	2013-10-10 17:14:04 UTC (rev 60668)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_cursor.c	2013-10-10 17:28:01 UTC (rev 60669)
@@ -89,7 +89,7 @@
 static CursorSnapshot cursor_snap  = {0};
 
 /* delete overlay cursor textures to preserve memory and invalidate all overlay flags */
-void paint_cursor_delete_textures()
+void paint_cursor_delete_textures(void)
 {
 	glDeleteTextures(1, &primary_snap.overlay_texture);
 	glDeleteTextures(1, &secondary_snap.overlay_texture);

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c	2013-10-10 17:14:04 UTC (rev 60668)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c	2013-10-10 17:28:01 UTC (rev 60669)
@@ -4685,7 +4685,7 @@
 	RNA_def_property_range(prop, 0.0, 1000.0);
 	RNA_def_property_ui_text(prop, "Scale",
 	                         "Instead of automatically normalizing to 0..1, "
-	                         "apply a user scale to the derivative map.");
+	                         "apply a user scale to the derivative map");
 
 	/* stamp */
 	




More information about the Bf-blender-cvs mailing list