[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42815] trunk/blender: split > 120 length lines (mostly if statements)

Campbell Barton ideasman42 at gmail.com
Thu Dec 22 01:03:21 CET 2011


Revision: 42815
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42815
Author:   campbellbarton
Date:     2011-12-22 00:03:20 +0000 (Thu, 22 Dec 2011)
Log Message:
-----------
split >120 length lines (mostly if statements)

Modified Paths:
--------------
    trunk/blender/intern/audaspace/intern/AUD_SoftwareDevice.cpp
    trunk/blender/source/blender/blenkernel/intern/idprop.c
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/editors/interface/interface.c
    trunk/blender/source/blender/editors/interface/interface_templates.c
    trunk/blender/source/blender/editors/mesh/editmesh.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
    trunk/blender/source/blender/editors/space_outliner/outliner_edit.c
    trunk/blender/source/blender/editors/space_outliner/outliner_select.c
    trunk/blender/source/blender/editors/space_view3d/view3d_header.c
    trunk/blender/source/blender/editors/space_view3d/view3d_view.c
    trunk/blender/source/blender/editors/transform/transform_conversions.c
    trunk/blender/source/blender/editors/transform/transform_snap.c
    trunk/blender/source/gameengine/Ketsji/KX_IPO_SGController.cpp

Modified: trunk/blender/intern/audaspace/intern/AUD_SoftwareDevice.cpp
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_SoftwareDevice.cpp	2011-12-21 23:59:57 UTC (rev 42814)
+++ trunk/blender/intern/audaspace/intern/AUD_SoftwareDevice.cpp	2011-12-22 00:03:20 UTC (rev 42815)
@@ -121,7 +121,9 @@
 
 		if(flags & AUD_RENDER_DISTANCE)
 		{
-			if(m_device->m_distance_model == AUD_DISTANCE_MODEL_INVERSE_CLAMPED || m_device->m_distance_model == AUD_DISTANCE_MODEL_LINEAR_CLAMPED || m_device->m_distance_model == AUD_DISTANCE_MODEL_EXPONENT_CLAMPED)
+			if(m_device->m_distance_model == AUD_DISTANCE_MODEL_INVERSE_CLAMPED ||
+			   m_device->m_distance_model == AUD_DISTANCE_MODEL_LINEAR_CLAMPED ||
+			   m_device->m_distance_model == AUD_DISTANCE_MODEL_EXPONENT_CLAMPED)
 			{
 				distance = AUD_MAX(AUD_MIN(m_distance_max, distance), m_distance_reference);
 			}

Modified: trunk/blender/source/blender/blenkernel/intern/idprop.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/idprop.c	2011-12-21 23:59:57 UTC (rev 42814)
+++ trunk/blender/source/blender/blenkernel/intern/idprop.c	2011-12-22 00:03:20 UTC (rev 42815)
@@ -692,7 +692,11 @@
 		case IDP_ARRAY:
 		{
 			/*for now, we only support float and int and double arrays*/
-			if (val->array.type == IDP_FLOAT || val->array.type == IDP_INT || val->array.type == IDP_DOUBLE || val->array.type == IDP_GROUP) {
+			if ( (val->array.type == IDP_FLOAT) ||
+			     (val->array.type == IDP_INT) ||
+			     (val->array.type == IDP_DOUBLE) ||
+			     (val->array.type == IDP_GROUP) )
+			{
 				prop = MEM_callocN(sizeof(IDProperty), "IDProperty array");
 				prop->subtype = val->array.type;
 				if (val->array.len)

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2011-12-21 23:59:57 UTC (rev 42814)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2011-12-22 00:03:20 UTC (rev 42815)
@@ -10691,8 +10691,11 @@
 				void *olddata = ob->data;
 				ob->data = me;
 
-				if(me && me->id.lib==NULL && me->mr && me->mr->level_count > 1) /* XXX - library meshes crash on loading most yoFrankie levels, the multires pointer gets invalid -  Campbell */
+				/* XXX - library meshes crash on loading most yoFrankie levels,
+				 * the multires pointer gets invalid -  Campbell */
+				if(me && me->id.lib==NULL && me->mr && me->mr->level_count > 1) {
 					multires_load_old(ob, me);
+				}
 
 				ob->data = olddata;
 			}
@@ -14271,7 +14274,8 @@
 
 					expand_main(fd, mainptr);
 					
-					/* dang FileData... now new libraries need to be appended to original filedata, it is not a good replacement for the old global (ton) */
+					/* dang FileData... now new libraries need to be appended to original filedata,
+					 * it is not a good replacement for the old global (ton) */
 					while( fd->mainlist.first ) {
 						Main *mp= fd->mainlist.first;
 						BLI_remlink(&fd->mainlist, mp);
@@ -14293,8 +14297,13 @@
 				ID *idn= id->next;
 				if(id->flag & LIB_READ) {
 					BLI_remlink(lbarray[a], id);
-					BKE_reportf(basefd->reports, RPT_ERROR, "LIB ERROR: %s:'%s' unread libblock missing from '%s'\n", BKE_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath);
-					if(!G.background && basefd->reports)printf("LIB ERROR: %s:'%s' unread libblock missing from '%s'\n", BKE_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath);
+					BKE_reportf(basefd->reports, RPT_ERROR,
+					            "LIB ERROR: %s:'%s' unread libblock missing from '%s'\n",
+					            BKE_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath);
+					if (!G.background && basefd->reports) {
+						printf("LIB ERROR: %s:'%s' unread libblock missing from '%s'\n",
+						       BKE_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath);
+					}
 					change_idid_adr(mainlist, basefd, id, NULL);
 
 					MEM_freeN(id);

Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c	2011-12-21 23:59:57 UTC (rev 42814)
+++ trunk/blender/source/blender/editors/interface/interface.c	2011-12-22 00:03:20 UTC (rev 42815)
@@ -904,7 +904,9 @@
 	/* handle pending stuff */
 	if(block->layouts.first) uiBlockLayoutResolve(block, NULL, NULL);
 	ui_block_do_align(block);
-	if((block->flag & UI_BLOCK_LOOP) && (block->flag & UI_BLOCK_NUMSELECT)) ui_menu_block_set_keyaccels(block); /* could use a different flag to check */
+	if((block->flag & UI_BLOCK_LOOP) && (block->flag & UI_BLOCK_NUMSELECT)) {
+		ui_menu_block_set_keyaccels(block); /* could use a different flag to check */
+	}
 	if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block);
 	
 	/* after keymaps! */

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c	2011-12-21 23:59:57 UTC (rev 42814)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c	2011-12-22 00:03:20 UTC (rev 42815)
@@ -681,7 +681,7 @@
 
 static int modifier_can_delete(ModifierData *md)
 {
-	// fluid particle modifier can't be deleted here
+	/* fluid particle modifier can't be deleted here */
 	if(md->type == eModifierType_ParticleSystem)
 		if(((ParticleSystemModifierData *)md)->psys->part->type == PART_FLUID)
 			return 0;
@@ -689,14 +689,16 @@
 	return 1;
 }
 
-// Check wheter Modifier is a simulation or not, this is used for switching to the physics/particles context tab
+/* Check wheter Modifier is a simulation or not, this is used for switching to the physics/particles context tab */
 static int modifier_is_simulation(ModifierData *md)
 {
-	// Physic Tab
-	if(ELEM7(md->type, eModifierType_Cloth, eModifierType_Collision, eModifierType_Fluidsim, eModifierType_Smoke, eModifierType_Softbody, eModifierType_Surface, eModifierType_DynamicPaint)) {
+	/* Physic Tab */
+	if (ELEM7(md->type, eModifierType_Cloth, eModifierType_Collision, eModifierType_Fluidsim, eModifierType_Smoke,
+	                    eModifierType_Softbody, eModifierType_Surface, eModifierType_DynamicPaint))
+	{
 		return 1;
 	}
-	// Particle Tab
+	/* Particle Tab */
 	else if (md->type == eModifierType_ParticleSystem) {
 		return 2;
 	}
@@ -705,7 +707,8 @@
 	}
 }
 
-static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, ModifierData *md, int index, int cageIndex, int lastCageIndex)
+static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
+                               ModifierData *md, int index, int cageIndex, int lastCageIndex)
 {
 	ModifierTypeInfo *mti = modifierType_getInfo(md->type);
 	PointerRNA ptr;

Modified: trunk/blender/source/blender/editors/mesh/editmesh.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh.c	2011-12-21 23:59:57 UTC (rev 42814)
+++ trunk/blender/source/blender/editors/mesh/editmesh.c	2011-12-22 00:03:20 UTC (rev 42815)
@@ -922,7 +922,10 @@
 		
 		for(a=0; a<me->totselect; a++, mselect++){
 			/*check if recorded selection is still valid, if so copy into editmesh*/
-			if( (mselect->type == EDITVERT && me->mvert[mselect->index].flag & SELECT) || (mselect->type == EDITEDGE && me->medge[mselect->index].flag & SELECT) || (mselect->type == EDITFACE && me->mface[mselect->index].flag & ME_FACE_SEL) ){
+			if ( (mselect->type == EDITVERT && me->mvert[mselect->index].flag & SELECT) ||
+			     (mselect->type == EDITEDGE && me->medge[mselect->index].flag & SELECT) ||
+			     (mselect->type == EDITFACE && me->mface[mselect->index].flag & ME_FACE_SEL) )
+			{
 				ese = MEM_callocN(sizeof(EditSelection), "Edit Selection");
 				ese->type = mselect->type;	
 				if(ese->type == EDITVERT) ese->data = EM_get_vert_for_index(mselect->index); else

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2011-12-21 23:59:57 UTC (rev 42814)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2011-12-22 00:03:20 UTC (rev 42815)
@@ -1816,7 +1816,9 @@
 		return 1;
 	 */
 	
-	if((bucket_bounds->xmin <= cent[0] && bucket_bounds->xmax >= cent[0]) || (bucket_bounds->ymin <= cent[1] && bucket_bounds->ymax >= cent[1]) ) {
+	if ( (bucket_bounds->xmin <= cent[0] && bucket_bounds->xmax >= cent[0]) ||
+	     (bucket_bounds->ymin <= cent[1] && bucket_bounds->ymax >= cent[1]) )
+	{
 		return 1;
 	}
 	
@@ -2816,7 +2818,11 @@
 	p4[0] = bucket_bounds.xmax;	p4[1] = bucket_bounds.ymin;
 		
 	if (mf->v4) {
-		if(	isect_point_quad_v2(p1, v1, v2, v3, v4) || isect_point_quad_v2(p2, v1, v2, v3, v4) || isect_point_quad_v2(p3, v1, v2, v3, v4) || isect_point_quad_v2(p4, v1, v2, v3, v4) ||
+		if ( isect_point_quad_v2(p1, v1, v2, v3, v4) ||
+		     isect_point_quad_v2(p2, v1, v2, v3, v4) ||
+		     isect_point_quad_v2(p3, v1, v2, v3, v4) ||
+		     isect_point_quad_v2(p4, v1, v2, v3, v4) ||
+
 			/* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */
 			(isect_line_line_v2(p1, p2, v1, v2) || isect_line_line_v2(p1, p2, v2, v3) || isect_line_line_v2(p1, p2, v3, v4)) ||
 			(isect_line_line_v2(p2, p3, v1, v2) || isect_line_line_v2(p2, p3, v2, v3) || isect_line_line_v2(p2, p3, v3, v4)) ||
@@ -2827,7 +2833,10 @@
 		}
 	}
 	else {
-		if(	isect_point_tri_v2(p1, v1, v2, v3) || isect_point_tri_v2(p2, v1, v2, v3) || isect_point_tri_v2(p3, v1, v2, v3) || isect_point_tri_v2(p4, v1, v2, v3) ||
+		if ( isect_point_tri_v2(p1, v1, v2, v3) ||
+		     isect_point_tri_v2(p2, v1, v2, v3) ||
+		     isect_point_tri_v2(p3, v1, v2, v3) ||
+		     isect_point_tri_v2(p4, v1, v2, v3) ||
 			/* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */
 			(isect_line_line_v2(p1, p2, v1, v2) || isect_line_line_v2(p1, p2, v2, v3)) ||
 			(isect_line_line_v2(p2, p3, v1, v2) || isect_line_line_v2(p2, p3, v2, v3)) ||

Modified: trunk/blender/source/blender/editors/space_outliner/outliner_edit.c

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list