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

Campbell Barton ideasman42 at gmail.com
Wed Mar 28 07:03:38 CEST 2012


Revision: 45228
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45228
Author:   campbellbarton
Date:     2012-03-28 05:03:24 +0000 (Wed, 28 Mar 2012)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/source/blender/collada/AnimationExporter.cpp
    trunk/blender/source/blender/collada/AnimationImporter.cpp
    trunk/blender/source/blender/collada/ArmatureImporter.cpp
    trunk/blender/source/blender/collada/DocumentImporter.cpp
    trunk/blender/source/blender/collada/EffectExporter.cpp
    trunk/blender/source/blender/collada/MeshImporter.cpp
    trunk/blender/source/blender/ikplugin/intern/itasc_plugin.cpp
    trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
    trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
    trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    trunk/blender/source/gameengine/Converter/BL_DeformableGameObject.cpp
    trunk/blender/source/gameengine/Converter/BL_MeshDeformer.cpp
    trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
    trunk/blender/source/gameengine/Converter/BL_SkinDeformer.cpp
    trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp
    trunk/blender/source/gameengine/Expressions/Expression.cpp
    trunk/blender/source/gameengine/Expressions/InputParser.cpp
    trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
    trunk/blender/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_MouseSensor.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
    trunk/blender/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
    trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    trunk/blender/source/gameengine/Ketsji/BL_Shader.cpp
    trunk/blender/source/gameengine/Ketsji/BL_Texture.cpp
    trunk/blender/source/gameengine/Ketsji/KX_Camera.cpp
    trunk/blender/source/gameengine/Ketsji/KX_Dome.cpp
    trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
    trunk/blender/source/gameengine/Ketsji/KX_IpoActuator.cpp
    trunk/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
    trunk/blender/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
    trunk/blender/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
    trunk/blender/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
    trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
    trunk/blender/source/gameengine/Ketsji/KX_TrackToActuator.cpp
    trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
    trunk/blender/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    trunk/blender/source/gameengine/Rasterizer/RAS_FramingManager.cpp
    trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
    trunk/blender/source/gameengine/SceneGraph/SG_Controller.cpp
    trunk/blender/source/gameengine/SceneGraph/SG_IObject.cpp
    trunk/blender/source/gameengine/SceneGraph/SG_Node.cpp
    trunk/blender/source/gameengine/SceneGraph/SG_Spatial.cpp

Modified: trunk/blender/source/blender/collada/AnimationExporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/AnimationExporter.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/blender/collada/AnimationExporter.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -153,14 +153,14 @@
 		char * transformName = extract_transform_name( fcu->rna_path );
 
 		if ( !strcmp(transformName, "rotation_quaternion") )	{ 
-			for ( int i = 0 ; i < fcu->totvert ; i++){
+			for ( int i = 0 ; i < fcu->totvert ; i++) {
 				*(quat + ( i * 4 ) + fcu->array_index) = fcu->bezt[i].vec[1][1];
 			}
 		}
 		fcu = fcu->next;
 	}
 
-	for ( int i = 0 ; i < keys ; i++){
+	for ( int i = 0 ; i < keys ; i++) {
 		for ( int j = 0;j<4;j++)
 			temp_quat[j] = quat[(i*4)+j];
 
@@ -335,8 +335,7 @@
 		return;
 
 	//This will only export animations of bones in deform group.
-	/*if(!is_bone_deform_group(bone))
-	return;*/
+	/* if (!is_bone_deform_group(bone)) return; */
 
 	sample_and_write_bone_animation_matrix(ob_arm, bone);
 
@@ -352,7 +351,7 @@
 	//Check child bones
 	else 
 	{   
-		for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next){
+		for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next) {
 			//loop through all the children until deform bone is found, and then return
 			is_def = is_bone_deform_group(child);
 			if (is_def) return true;

Modified: trunk/blender/source/blender/collada/AnimationImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/AnimationImporter.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/blender/collada/AnimationImporter.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -948,7 +948,7 @@
 
 		}
 	}
-	if ( animType->material != 0){
+	if ( animType->material != 0) {
 		Material *ma = give_current_material(ob, 1);
 		if (!ma->adt || !ma->adt->action) act = verify_adt_action((ID*)&ma->id, 1);
 		else act = ma->adt->action;
@@ -964,25 +964,25 @@
 				if (ef != NULL) { /* can be NULL [#28909] */
 					const COLLADAFW::CommonEffectPointerArray& commonEffects  =  ef->getCommonEffects();
 					COLLADAFW::EffectCommon *efc = commonEffects[0];
-					if ((animType->material & MATERIAL_SHININESS) != 0){
+					if ((animType->material & MATERIAL_SHININESS) != 0) {
 						const COLLADAFW::FloatOrParam *shin = &(efc->getShininess());
 						const COLLADAFW::UniqueId& listid =  shin->getAnimationList();
 						Assign_float_animations( listid, AnimCurves , "specular_hardness" );
 					}
 
-					if ((animType->material & MATERIAL_IOR) != 0){
+					if ((animType->material & MATERIAL_IOR) != 0) {
 						const COLLADAFW::FloatOrParam *ior = &(efc->getIndexOfRefraction());
 						const COLLADAFW::UniqueId& listid =  ior->getAnimationList();
 						Assign_float_animations( listid, AnimCurves , "raytrace_transparency.ior" );
 					}
 
-					if ((animType->material & MATERIAL_SPEC_COLOR) != 0){
+					if ((animType->material & MATERIAL_SPEC_COLOR) != 0) {
 						const COLLADAFW::ColorOrTexture *cot = &(efc->getSpecular());
 						const COLLADAFW::UniqueId& listid =  cot->getColor().getAnimationList();
 						Assign_color_animations( listid, AnimCurves , "specular_color" );
 					}
 
-					if ((animType->material & MATERIAL_DIFF_COLOR) != 0){
+					if ((animType->material & MATERIAL_DIFF_COLOR) != 0) {
 						const COLLADAFW::ColorOrTexture *cot = &(efc->getDiffuse());
 						const COLLADAFW::UniqueId& listid =  cot->getColor().getAnimationList();
 						Assign_color_animations( listid, AnimCurves , "diffuse_color" );

Modified: trunk/blender/source/blender/collada/ArmatureImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/ArmatureImporter.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/blender/collada/ArmatureImporter.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -98,7 +98,7 @@
 	float angle = 0;
 
 	// get world-space
-	if (parent){
+	if (parent) {
 		mult_m4_m4m4(mat, parent_mat, obmat);
 
 	}
@@ -582,12 +582,12 @@
 	// object-space
 	get_node_mat(obmat, root_node, NULL, NULL);
 
-	//if(*edbone)
+	//if (*edbone)
 	bPoseChannel * pchan  = get_pose_channel(ob_arm -> pose ,  bone_name); 
 	//else fprintf ( "",
 
 	// get world-space
-	if (parentname){
+	if (parentname) {
 		mult_m4_m4m4(mat, parent_mat, obmat);
 		bPoseChannel *parchan = get_pose_channel(ob_arm->pose, parentname);
 

Modified: trunk/blender/source/blender/collada/DocumentImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/DocumentImporter.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/blender/collada/DocumentImporter.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -157,7 +157,7 @@
 	// The latter sounds better.
 }
 
-void DocumentImporter::start(){}
+void DocumentImporter::start() {}
 
 void DocumentImporter::finish()
 {

Modified: trunk/blender/source/blender/collada/EffectExporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/EffectExporter.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/blender/collada/EffectExporter.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -364,9 +364,10 @@
 
 	for (int a = 0; a < MAX_MTEX; a++) {
 		if (ma->mtex[a] &&
-			ma->mtex[a]->tex &&
-			ma->mtex[a]->tex->type == TEX_IMAGE &&
-			ma->mtex[a]->texco == TEXCO_UV){
+		    ma->mtex[a]->tex &&
+		    ma->mtex[a]->tex->type == TEX_IMAGE &&
+		    ma->mtex[a]->texco == TEXCO_UV)
+		{
 			indices.push_back(a);
 		}
 	}

Modified: trunk/blender/source/blender/collada/MeshImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/MeshImporter.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/blender/collada/MeshImporter.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -281,7 +281,7 @@
 			COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons*)mp;
 			COLLADAFW::Polygons::VertexCountArray& vca = mpvc->getGroupedVerticesVertexCountArray();
 			
-			for (unsigned int j = 0; j < vca.getCount(); j++){
+			for (unsigned int j = 0; j < vca.getCount(); j++) {
 				int count = vca[j];
 				if (count < 3) {
 					fprintf(stderr, "Primitive %s in %s has at least one face with vertex count < 3\n",
@@ -486,7 +486,7 @@
 #endif
 		
 		if (type == COLLADAFW::MeshPrimitive::TRIANGLES) {
-			for (j = 0; j < prim_totface; j++){
+			for (j = 0; j < prim_totface; j++) {
 				
 				set_face_indices(mface, indices, false);
 				indices += 3;
@@ -527,12 +527,12 @@
 		// The first trifan vertex will be the first vertex in every triangle
 		if (type == COLLADAFW::MeshPrimitive::TRIANGLE_FANS) {
 			unsigned grouped_vertex_count = mp->getGroupedVertexElementsCount();
-			for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++){
+			for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++) {
 				unsigned int first_vertex = indices[0]; // Store first trifan vertex
 				unsigned int first_normal = nind[0]; // Store first trifan vertex normal
 				unsigned int vertex_count = mp->getGroupedVerticesVertexCount(group_index);
 
-				for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++){
+				for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++) {
 					// For each triangle store indeces of its 3 vertices
 					unsigned int triangle_vertex_indices[3]={first_vertex, indices[1], indices[2]};
 					set_face_indices(mface, triangle_vertex_indices, false);

Modified: trunk/blender/source/blender/ikplugin/intern/itasc_plugin.cpp
===================================================================
--- trunk/blender/source/blender/ikplugin/intern/itasc_plugin.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/blender/ikplugin/intern/itasc_plugin.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -250,16 +250,16 @@
 	
 	rootbone = data->rootbone;
 	/* Find the chain's root & count the segments needed */
-	for (curchan = pchan_tip; curchan; curchan=curchan->parent){
+	for (curchan = pchan_tip; curchan; curchan=curchan->parent) {
 		pchan_root = curchan;
 		
 		if (++segcount > 255)		// 255 is weak
 			break;
 
-		if (segcount==rootbone){
+		if (segcount==rootbone) {
 			// reached this end of the chain but if the chain is overlapping with a 
 			// previous one, we must go back up to the root of the other chain
-			if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL){
+			if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL) {
 				rootbone++;
 				continue;
 			}

Modified: trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
===================================================================
--- trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -254,7 +254,7 @@
 		int tmp_lay= startscene->lay;
 		Object *tmp_camera = startscene->camera;
 
-		if (v3d->scenelock==0){
+		if (v3d->scenelock==0) {
 			startscene->lay= v3d->lay;
 			startscene->camera= v3d->camera;
 		}
@@ -341,7 +341,7 @@
 			ketsjiengine->SetAnimRecordMode(animation_record, startFrame);
 			
 			// Quad buffered needs a special window.
-			if (scene->gm.stereoflag == STEREO_ENABLED){
+			if (scene->gm.stereoflag == STEREO_ENABLED) {
 				if (scene->gm.stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
 					rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) scene->gm.stereomode);
 
@@ -552,7 +552,7 @@
 #endif
 		}
 		//lock frame and camera enabled - restoring global values
-		if (v3d->scenelock==0){
+		if (v3d->scenelock==0) {
 			startscene->lay= tmp_lay;
 			startscene->camera= tmp_camera;
 		}

Modified: trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
===================================================================
--- trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp	2012-03-28 03:47:33 UTC (rev 45227)
+++ trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp	2012-03-28 05:03:24 UTC (rev 45228)
@@ -141,7 +141,7 @@
 RAS_Rect &
 KX_BlenderCanvas::
 GetWindowArea(
-){
+) {
 	return m_area_rect;
 }	
 
@@ -150,7 +150,7 @@
 SetViewPort(
 	int x1, int y1,

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list