[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43529] trunk/blender/source/blender/ editors/space_view3d: style edits - < 120 line width

Campbell Barton ideasman42 at gmail.com
Thu Jan 19 17:04:51 CET 2012


Revision: 43529
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43529
Author:   campbellbarton
Date:     2012-01-19 16:04:44 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
style edits - < 120 line width

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/drawarmature.c
    trunk/blender/source/blender/editors/space_view3d/drawobject.c
    trunk/blender/source/blender/editors/space_view3d/drawvolume.c
    trunk/blender/source/blender/editors/space_view3d/space_view3d.c
    trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
    trunk/blender/source/blender/editors/space_view3d/view3d_intern.h
    trunk/blender/source/blender/editors/space_view3d/view3d_select.c
    trunk/blender/source/blender/editors/space_view3d/view3d_view.c

Modified: trunk/blender/source/blender/editors/space_view3d/drawarmature.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawarmature.c	2012-01-19 15:11:22 UTC (rev 43528)
+++ trunk/blender/source/blender/editors/space_view3d/drawarmature.c	2012-01-19 16:04:44 UTC (rev 43529)
@@ -526,7 +526,8 @@
 		glEnableClientState(GL_VERTEX_ARRAY);
 		glNormalPointer(GL_FLOAT, 0, bone_octahedral_solid_normals);
 		glVertexPointer(3, GL_FLOAT, 0, bone_octahedral_verts);
-		glDrawElements(GL_TRIANGLES, sizeof(bone_octahedral_solid_tris)/sizeof(unsigned int), GL_UNSIGNED_INT, bone_octahedral_solid_tris);
+		glDrawElements(GL_TRIANGLES, sizeof(bone_octahedral_solid_tris)/sizeof(unsigned int),
+		               GL_UNSIGNED_INT, bone_octahedral_solid_tris);
 		glDisableClientState(GL_NORMAL_ARRAY);
 		glDisableClientState(GL_VERTEX_ARRAY);
 #endif
@@ -738,7 +739,9 @@
 
 
 /* smat, imat = mat & imat to draw screenaligned */
-static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag, int boneflag, short constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
+static void draw_sphere_bone_wire(float smat[][4], float imat[][4],
+                                  int armflag, int boneflag, short constflag, unsigned int id,
+                                  bPoseChannel *pchan, EditBone *ebone)
 {
 	float head, tail /*, length*/;
 	float *headvec, *tailvec, dirvec[3];
@@ -843,7 +846,8 @@
 }
 
 /* does wire only for outline selecting */
-static void draw_sphere_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
+static void draw_sphere_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id,
+                             bPoseChannel *pchan, EditBone *ebone)
 {
 	GLUquadricObj	*qobj;
 	float head, tail, length;
@@ -973,7 +977,8 @@
 static GLubyte bm_dot7[]= {0x0, 0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38}; 
 
 
-static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
+static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned int id,
+                           bPoseChannel *pchan, EditBone *ebone)
 {
 	float length;
 	
@@ -1107,7 +1112,8 @@
 	}
 }
 
-static void draw_b_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
+static void draw_b_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id,
+                        bPoseChannel *pchan, EditBone *ebone)
 {
 	float xwidth, length, zwidth;
 	
@@ -1220,7 +1226,8 @@
 	}
 }
 
-static void draw_wire_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
+static void draw_wire_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id,
+                           bPoseChannel *pchan, EditBone *ebone)
 {
 	Mat4 *bbones = NULL;
 	int segments = 0;
@@ -1340,7 +1347,8 @@
 	}
 }
 
-static void draw_custom_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int dt, int armflag, int boneflag, unsigned int id, float length)
+static void draw_custom_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob,
+                             int dt, int armflag, int boneflag, unsigned int id, float length)
 {
 	if(ob==NULL) return;
 	
@@ -1573,7 +1581,8 @@
 								glColor3ub(50, 50, 255);	// blue, Z axis limit
 								glBegin(GL_LINE_STRIP);
 								for (a=-16; a<=16; a++) {
-									float fac= ((float)a)/16.0f * 0.5f; /* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */
+									/* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */
+									float fac= ((float)a)/16.0f * 0.5f;
 									
 									phi= fac * (pchan->limitmax[2] - pchan->limitmin[2]);
 									
@@ -1596,7 +1605,8 @@
 								glColor3ub(255, 50, 50);	// Red, X axis limit
 								glBegin(GL_LINE_STRIP);
 								for (a=-16; a<=16; a++) {
-									float fac= ((float)a)/16.0f * 0.5f; /* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */
+									/* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */
+									float fac= ((float)a)/16.0f * 0.5f;
 									phi= (float)(0.5*M_PI) + fac * (pchan->limitmax[0] - pchan->limitmin[0]);
 									
 									i= (a == -16) ? 2 : 3;
@@ -1630,7 +1640,8 @@
 }
 
 /* assumes object is Armature with pose */
-static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, const short is_ghost, const short is_outline)
+static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt,
+                            const short is_ghost, const short is_outline)
 {
 	RegionView3D *rv3d= ar->regiondata;
 	Object *ob= base->object;
@@ -1730,10 +1741,13 @@
 					
 					if (use_custom) {
 						/* if drawwire, don't try to draw in solid */
-						if (pchan->bone->flag & BONE_DRAWWIRE) 
+						if (pchan->bone->flag & BONE_DRAWWIRE) {
 							draw_wire= 1;
-						else
-							draw_custom_bone(scene, v3d, rv3d, pchan->custom, OB_SOLID, arm->flag, flag, index, bone->length);
+						}
+						else {
+							draw_custom_bone(scene, v3d, rv3d, pchan->custom,
+							                 OB_SOLID, arm->flag, flag, index, bone->length);
+						}
 					}
 					else if (arm->drawtype==ARM_LINE)
 						;	/* nothing in solid */
@@ -1817,7 +1831,8 @@
 							if (bone == arm->act_bone)
 								flag |= BONE_DRAW_ACTIVE;
 							
-							draw_custom_bone(scene, v3d, rv3d, pchan->custom, OB_WIRE, arm->flag, flag, index, bone->length);
+							draw_custom_bone(scene, v3d, rv3d, pchan->custom,
+							                 OB_WIRE, arm->flag, flag, index, bone->length);
 							
 							glPopMatrix();
 						}
@@ -2580,7 +2595,3 @@
 
 	return retval;
 }
-
-/* *************** END Armature drawing ******************* */
-
-

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-01-19 15:11:22 UTC (rev 43528)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-01-19 16:04:44 UTC (rev 43529)
@@ -2695,10 +2695,14 @@
 					mul_mat3_m4_v3(ob->obmat, v1);
 					mul_mat3_m4_v3(ob->obmat, v2);
 				}
-				if(unit->system)
-					bUnit_AsString(numstr, sizeof(numstr), len_v3v3(v1, v2)*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE);
-				else
+
+				if(unit->system) {
+					bUnit_AsString(numstr, sizeof(numstr), len_v3v3(v1, v2) * unit->scale_length, 3,
+					               unit->system, B_UNIT_LENGTH, do_split, FALSE);
+				}
+				else {
 					sprintf(numstr, conv_float, len_v3v3(v1, v2));
+				}
 
 				view3d_cached_text_draw_add(vmid, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
 			}
@@ -2706,7 +2710,7 @@
 	}
 
 	if(me->drawflag & ME_DRAWEXTRA_FACEAREA) {
-// XXX		extern int faceselectedOR(EditFace *efa, int flag);		// editmesh.h shouldn't be in this file... ok for now?
+// XXX		extern int faceselectedOR(EditFace *efa, int flag); // editmesh.h shouldn't be in this file... ok for now?
 		UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col);
 		
 		for(efa= em->faces.first; efa; efa= efa->next) {
@@ -2729,10 +2733,14 @@
 				else
 					area = area_tri_v3(v1, v2, v3);
 
-				if(unit->system)
-					bUnit_AsString(numstr, sizeof(numstr), area*unit->scale_length, 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); // XXX should be B_UNIT_AREA
-				else
+				if(unit->system) {
+					// XXX should be B_UNIT_AREA
+					bUnit_AsString(numstr, sizeof(numstr), area * unit->scale_length, 3,
+					               unit->system, B_UNIT_LENGTH, do_split, FALSE);
+				}
+				else {
 					sprintf(numstr, conv_float, area);
+				}
 
 				view3d_cached_text_draw_add(efa->cent, numstr, 0, V3D_CACHE_TEXT_ASCII, col);
 			}

Modified: trunk/blender/source/blender/editors/space_view3d/drawvolume.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawvolume.c	2012-01-19 15:11:22 UTC (rev 43528)
+++ trunk/blender/source/blender/editors/space_view3d/drawvolume.c	2012-01-19 16:04:44 UTC (rev 43529)
@@ -170,7 +170,8 @@
 	float cor[3] = {1.,1.,1.};
 	int gl_depth = 0, gl_blend = 0;
 
-	/* draw slices of smoke is adapted from c++ code authored by: Johannes Schmid and Ingemar Rask, 2006, johnny at grob.org */
+	/* draw slices of smoke is adapted from c++ code authored
+	 * by: Johannes Schmid and Ingemar Rask, 2006, johnny at grob.org */
 	float cv[][3] = {
 		{1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, -1.0f, 1.0f}, {1.0f, -1.0f, 1.0f},
 		{1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}, {1.0f, -1.0f, -1.0f}
@@ -424,7 +425,9 @@
 			glBegin(GL_POLYGON);
 			glColor3f(1.0, 1.0, 1.0);
 			for (i = 0; i < numpoints; i++) {
-				glTexCoord3d((points[i * 3 + 0] - min[0] )*cor[0]/size[0], (points[i * 3 + 1] - min[1])*cor[1]/size[1], (points[i * 3 + 2] - min[2])*cor[2]/size[2]);
+				glTexCoord3d((points[i * 3 + 0] - min[0]) * cor[0] / size[0],
+				             (points[i * 3 + 1] - min[1]) * cor[1] / size[1],
+				             (points[i * 3 + 2] - min[2]) * cor[2] / size[2]);
 				glVertex3f(points[i * 3 + 0], points[i * 3 + 1], points[i * 3 + 2]);
 			}
 			glEnd();

Modified: trunk/blender/source/blender/editors/space_view3d/space_view3d.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/space_view3d.c	2012-01-19 15:11:22 UTC (rev 43528)
+++ trunk/blender/source/blender/editors/space_view3d/space_view3d.c	2012-01-19 16:04:44 UTC (rev 43529)
@@ -1023,7 +1023,8 @@
 			break;
 	}
 
-#if 0 // removed since BKE_image_user_calc_frame is now called in draw_bgpic because screen_ops doesnt call the notifier.
+	// removed since BKE_image_user_calc_frame is now called in draw_bgpic because screen_ops doesnt call the notifier.
+#if 0
 	if (wmn->category == NC_SCENE && wmn->data == ND_FRAME) {
 		View3D *v3d = area->spacedata.first;
 		BGpic *bgpic = v3d->bgpicbase.first;
@@ -1048,7 +1049,8 @@
 	View3D *v3d= CTX_wm_view3d(C);
 	Scene *scene= CTX_data_scene(C);
 	Base *base;
-	unsigned int lay = v3d ? v3d->lay:scene->lay; /* fallback to the scene layer, allows duplicate and other oject operators to run outside the 3d view */

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list