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

Campbell Barton ideasman42 at gmail.com
Wed Oct 16 06:08:21 CEST 2013


Revision: 60795
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60795
Author:   campbellbarton
Date:     2013-10-16 04:08:20 +0000 (Wed, 16 Oct 2013)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bpy/utils.py
    trunk/blender/source/blender/editors/screen/screendump.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
    trunk/blender/source/blender/editors/space_view3d/drawmesh.c
    trunk/blender/source/blender/gpu/intern/gpu_codegen.c
    trunk/blender/source/blender/makesrna/intern/rna_key.c
    trunk/blender/source/blender/render/intern/source/bake.c
    trunk/blender/source/blender/render/intern/source/render_texture.c

Modified: trunk/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/utils.py	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/release/scripts/modules/bpy/utils.py	2013-10-16 04:08:20 UTC (rev 60795)
@@ -677,7 +677,7 @@
         if prop_name:
             src = src_rna = ".".join((struct_name, prop_name))
             if enum_name:
-                src = src_enum = "{}:'{}'".format(src_rna, enum_name)
+                src = src_enum = "%s:'%s'" % (src_rna, enum_name)
         else:
             src = src_rna = struct_name
     return src, src_rna, src_enum

Modified: trunk/blender/source/blender/editors/screen/screendump.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screendump.c	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/source/blender/editors/screen/screendump.c	2013-10-16 04:08:20 UTC (rev 60795)
@@ -105,7 +105,7 @@
 		
 		dumprect = MEM_mallocN(sizeof(int) * (*dumpsx) * (*dumpsy), "dumprect");
 		glReadBuffer(GL_FRONT);
-		screenshot_read_pixels(x, y, *dumpsx, *dumpsy, (unsigned char*)dumprect);
+		screenshot_read_pixels(x, y, *dumpsx, *dumpsy, (unsigned char *)dumprect);
 		glReadBuffer(GL_BACK);
 	}
 

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2013-10-16 04:08:20 UTC (rev 60795)
@@ -949,7 +949,7 @@
 	RNA_int_get_array(op->ptr, "location", location);
 	paint_sample_color(C, ar, location[0], location[1]);
 
-	if(show_cursor) {
+	if (show_cursor) {
 		paint->flags |= PAINT_SHOW_BRUSH;
 	}
 
@@ -989,7 +989,7 @@
 	Brush *brush = BKE_paint_brush(paint);
 
 	if ((event->type == data->event_type) && (event->val == KM_RELEASE)) {
-		if(data->show_cursor) {
+		if (data->show_cursor) {
 			paint->flags |= PAINT_SHOW_BRUSH;
 		}
 

Modified: trunk/blender/source/blender/editors/space_view3d/drawmesh.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawmesh.c	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/source/blender/editors/space_view3d/drawmesh.c	2013-10-16 04:08:20 UTC (rev 60795)
@@ -345,7 +345,7 @@
 	else {
 		/* draw with lights in the scene otherwise */
 		solidtex = false;
-		if(v3d->flag2 & V3D_SHADELESS_TEX)
+		if (v3d->flag2 & V3D_SHADELESS_TEX)
 			Gtexdraw.is_lit = 0;
 		else
 			Gtexdraw.is_lit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);

Modified: trunk/blender/source/blender/gpu/intern/gpu_codegen.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_codegen.c	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/source/blender/gpu/intern/gpu_codegen.c	2013-10-16 04:08:20 UTC (rev 60795)
@@ -65,7 +65,7 @@
 
 /* structs and defines */
 
-static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
+static const char *GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
 	NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"};
 
 #define LINK_IMAGE_BLENDER	1

Modified: trunk/blender/source/blender/makesrna/intern/rna_key.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_key.c	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/source/blender/makesrna/intern/rna_key.c	2013-10-16 04:08:20 UTC (rev 60795)
@@ -405,7 +405,7 @@
 			}
 			
 			/* determine where end of array is
-			 *	- elemsize is in bytes, so use char* cast to get array in terms of bytes
+			 *	- elemsize is in bytes, so use (char *) cast to get array in terms of bytes
 			 */
 			end = (float *)((char *)start + (key->elemsize * kb->totelem));
 			
@@ -422,7 +422,7 @@
 
 static int rna_ShapeKeyPoint_get_index(Key *key, KeyBlock *kb, float *point)
 {
-	/* if we frame the data array and point pointers as char*, then the difference between
+	/* if we frame the data array and point pointers as (char *), then the difference between
 	 * them will be in bytes. Thus, dividing through by key->elemsize (number of bytes per point)
 	 * gives us the offset of point from start of array.
 	 */

Modified: trunk/blender/source/blender/render/intern/source/bake.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/bake.c	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/source/blender/render/intern/source/bake.c	2013-10-16 04:08:20 UTC (rev 60795)
@@ -1141,7 +1141,7 @@
 
 static void add_single_heights_margin(const ImBuf *ibuf, const char *mask, float *heights_buffer)
 {
-	int x ,y;
+	int x, y;
 
 	for (y = 0; y < ibuf->y; y++) {
 		for (x = 0; x < ibuf->x; x++) {
@@ -1200,11 +1200,11 @@
 	if (auto_range_fit) {
 		/* If automatic range fitting is enabled. */
 		for (y = 0; y < ibuf->y; y++) {
-			const int Yu = y == (ibuf->y - 1) ? (ibuf->y - 1) : (y+1);
+			const int Yu = y == (ibuf->y - 1) ? (ibuf->y - 1) : (y + 1);
 			const int Yc = y;
 			const int Yd = y == 0 ? 0 : (y - 1);
 
-			for (x= 0; x < ibuf->x; x++) {
+			for (x = 0; x < ibuf->x; x++) {
 				const int Xl = x == 0 ? 0 : (x - 1);
 				const int Xc = x;
 				const int Xr = x == (ibuf->x - 1) ? (ibuf->x - 1) : (x + 1);
@@ -1244,11 +1244,11 @@
 	/* Output derivatives. */
 	auto_range_fit &= (max_num_deriv > 0);
 	for (y = 0; y < ibuf->y; y++) {
-		const int Yu= y==(ibuf->y-1) ? (ibuf->y-1) : (y+1);
-		const int Yc= y;
-		const int Yd= y==0 ? 0 : (y-1);
+		const int Yu = y == (ibuf->y - 1) ? (ibuf->y - 1) : (y + 1);
+		const int Yc = y;
+		const int Yd = y == 0 ? 0 : (y - 1);
 
-		for(x= 0; x<ibuf->x; x++) {
+		for (x = 0; x < ibuf->x; x++) {
 			const int Xl = x == 0 ? 0 : (x - 1);
 			const int Xc = x;
 			const int Xr = x == (ibuf->x - 1) ? (ibuf->x - 1) : (x + 1);
@@ -1269,14 +1269,15 @@
 
 			/* Early out. */
 			index = ibuf->x * y + x;
-			if (mask[index] != FILTER_MASK_USED){
+			if (mask[index] != FILTER_MASK_USED) {
 				continue;
 			}
 
 			if (auto_range_fit) {
 				deriv_x /= max_num_deriv;
 				deriv_y /= max_num_deriv;
-			} else {
+			}
+			else {
 				deriv_x *= (fmult / denom);
 				deriv_y *= (fmult / denom);
 			}
@@ -1296,8 +1297,9 @@
 				rrgbf[1] = deriv_y;
 				rrgbf[2] = 0.0f;
 				rrgbf[3] = 1.0f;
-			} else {
-				char *rrgb = (char*)ibuf->rect + index * 4;
+			}
+			else {
+				char *rrgb = (char *)ibuf->rect + index * 4;
 
 				rrgb[0] = FTOCHAR(deriv_x);
 				rrgb[1] = FTOCHAR(deriv_y);

Modified: trunk/blender/source/blender/render/intern/source/render_texture.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/render_texture.c	2013-10-16 03:24:50 UTC (rev 60794)
+++ trunk/blender/source/blender/render/intern/source/render_texture.c	2013-10-16 04:08:20 UTC (rev 60795)
@@ -1724,7 +1724,7 @@
 	const float bf = -0.04f*Tnor*mtex->norfac;
 	int rgbnor;
 	/* disable internal bump eval */
-	float* nvec = texres->nor;
+	float *nvec = texres->nor;
 	texres->nor = NULL;
 	/* du & dv estimates, constant value defaults */
 	du = dv = 0.01f;




More information about the Bf-blender-cvs mailing list