[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48743] trunk/blender/source/blender/ editors/space_view3d: style cleanup
Campbell Barton
ideasman42 at gmail.com
Sun Jul 8 22:36:01 CEST 2012
Revision: 48743
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48743
Author: campbellbarton
Date: 2012-07-08 20:36:00 +0000 (Sun, 08 Jul 2012)
Log Message:
-----------
style cleanup
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/drawanimviz.c
trunk/blender/source/blender/editors/space_view3d/drawarmature.c
trunk/blender/source/blender/editors/space_view3d/drawmesh.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_header.c
trunk/blender/source/blender/editors/space_view3d/view3d_select.c
trunk/blender/source/blender/editors/space_view3d/view3d_snap.c
trunk/blender/source/blender/editors/space_view3d/view3d_view.c
Modified: trunk/blender/source/blender/editors/space_view3d/drawanimviz.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawanimviz.c 2012-07-08 20:05:40 UTC (rev 48742)
+++ trunk/blender/source/blender/editors/space_view3d/drawanimviz.c 2012-07-08 20:36:00 UTC (rev 48743)
@@ -135,10 +135,10 @@
/* draw curve-line of path */
glShadeModel(GL_SMOOTH);
- glBegin(GL_LINE_STRIP);
+ glBegin(GL_LINE_STRIP);
for (i = 0, mpv = mpv_start; i < len; i++, mpv++) {
short sel = (pchan) ? (pchan->bone->flag & BONE_SELECTED) : (ob->flag & SELECT);
- float intensity; /* how faint */
+ float intensity; /* how faint */
/* set color
* - more intense for active/selected bones, less intense for unselected bones
@@ -223,7 +223,7 @@
UI_ThemeColor(TH_TEXT_HI);
}
- // XXX, this isn't up to date but probably should be kept so.
+ /* XXX, this isn't up to date but probably should be kept so. */
invert_m4_m4(ob->imat, ob->obmat);
/* Draw frame numbers at each framestep value */
Modified: trunk/blender/source/blender/editors/space_view3d/drawarmature.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawarmature.c 2012-07-08 20:05:40 UTC (rev 48742)
+++ trunk/blender/source/blender/editors/space_view3d/drawarmature.c 2012-07-08 20:36:00 UTC (rev 48743)
@@ -686,13 +686,13 @@
tailvec = headvec;
tail = head;
zero_v3(dirvec);
- dirvec[0] = 0.00001; // XXX. weak but ok
+ dirvec[0] = 0.00001; /* XXX. weak but ok */
}
else if (tail - view_dist > head) {
headvec = tailvec;
head = tail;
zero_v3(dirvec);
- dirvec[0] = 0.00001; // XXX. weak but ok
+ dirvec[0] = 0.00001; /* XXX. weak but ok */
}
}
@@ -1019,7 +1019,7 @@
/* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
- if (G.f & G_PICKSEL) { // no bitmap in selection mode, crashes 3d cards...
+ if (G.f & G_PICKSEL) { /* no bitmap in selection mode, crashes 3d cards... */
glLoadName(id | BONESEL_ROOT);
glBegin(GL_POINTS);
glVertex3f(0.0f, 0.0f, 0.0f);
@@ -1151,7 +1151,7 @@
glScalef(length, length, length);
draw_bone_points(dt, armflag, boneflag, id);
glPopMatrix();
- length *= 0.95f; // make vertices visible
+ length *= 0.95f; /* make vertices visible */
}
/* colors for modes */
@@ -1225,7 +1225,7 @@
glBegin(GL_LINES);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(0.0f, dlen, 0.0f);
- glEnd(); // GL_LINES
+ glEnd(); /* GL_LINES */
glPopMatrix();
}
@@ -1266,7 +1266,7 @@
glScalef(length, length, length);
draw_bone_points(dt, armflag, boneflag, id);
glPopMatrix();
- length *= 0.95f; // make vertices visible
+ length *= 0.95f; /* make vertices visible */
}
/* this chunk not in object mode */
@@ -1416,7 +1416,9 @@
/* Find the chain's root */
while (parchan->parent) {
segcount++;
- if (segcount == data->rootbone || segcount > 255) break; // 255 is weak
+ if (segcount == data->rootbone || segcount > 255) {
+ break; /* 255 is weak */
+ }
parchan = parchan->parent;
}
if (parchan)
@@ -1440,13 +1442,13 @@
/* Find the chain's root */
while (parchan->parent) {
segcount++;
- // FIXME: revise the breaking conditions
- if (segcount == data->chainlen || segcount > 255) break; // 255 is weak
+ /* FIXME: revise the breaking conditions */
+ if (segcount == data->chainlen || segcount > 255) break; /* 255 is weak */
parchan = parchan->parent;
}
- if (parchan) // XXX revise the breaking conditions to only stop at the tail?
+ if (parchan) /* XXX revise the breaking conditions to only stop at the tail? */
glVertex3fv(parchan->pose_head);
-
+
glEnd();
setlinestyle(0);
}
@@ -1594,7 +1596,7 @@
theta = RAD2DEGF(0.5f * (pchan->limitmin[2] + pchan->limitmax[2]));
glRotatef(theta, 0.0f, 0.0f, 1.0f);
- glColor3ub(50, 50, 255); // blue, Z axis limit
+ glColor3ub(50, 50, 255); /* blue, Z axis limit */
glBegin(GL_LINE_STRIP);
for (a = -16; a <= 16; a++) {
/* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */
@@ -1611,14 +1613,14 @@
glEnd();
glRotatef(-theta, 0.0f, 0.0f, 1.0f);
- }
+ }
if (pchan->ikflag & BONE_IK_XLIMIT) {
/* OpenGL requires rotations in degrees; so we're taking the average angle here */
theta = RAD2DEGF(0.5f * (pchan->limitmin[0] + pchan->limitmax[0]));
glRotatef(theta, 1.0f, 0.0f, 0.0f);
- glColor3ub(255, 50, 50); // Red, X axis limit
+ glColor3ub(255, 50, 50); /* Red, X axis limit */
glBegin(GL_LINE_STRIP);
for (a = -16; a <= 16; a++) {
/* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */
@@ -1792,7 +1794,7 @@
}
if (index != -1)
- index += 0x10000; // pose bones count in higher 2 bytes only
+ index += 0x10000; /* pose bones count in higher 2 bytes only */
}
/* very very confusing... but in object mode, solid draw, we cannot do glLoadName yet,
@@ -1861,7 +1863,7 @@
}
if (index != -1)
- index += 0x10000; // pose bones count in higher 2 bytes only
+ index += 0x10000; /* pose bones count in higher 2 bytes only */
}
/* stick or wire bones have not been drawn yet so don't clear object selection in this case */
if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && draw_wire) {
@@ -1900,11 +1902,11 @@
const short constflag = pchan->constflag;
if ((do_dashed & 1) && (pchan->parent)) {
/* Draw a line from our root to the parent's tip
- * - only if V3D_HIDE_HELPLINES is enabled...
+ * - only if V3D_HIDE_HELPLINES is enabled...
*/
if ( (do_dashed & 2) && ((bone->flag & BONE_CONNECTED) == 0) ) {
if (arm->flag & ARM_POSEMODE) {
- glLoadName(index & 0xFFFF); // object tag, for bordersel optim
+ glLoadName(index & 0xFFFF); /* object tag, for bordersel optim */
UI_ThemeColor(TH_WIRE);
}
setlinestyle(3);
@@ -1922,15 +1924,15 @@
if (constflag & PCHAN_HAS_IK) {
if (bone->flag & BONE_SELECTED) {
if (constflag & PCHAN_HAS_TARGET) glColor3ub(200, 120, 0);
- else glColor3ub(200, 200, 50); // add theme!
-
+ else glColor3ub(200, 200, 50); /* add theme! */
+
glLoadName(index & 0xFFFF);
pchan_draw_IK_root_lines(pchan, !(do_dashed & 2));
}
}
else if (constflag & PCHAN_HAS_SPLINEIK) {
if (bone->flag & BONE_SELECTED) {
- glColor3ub(150, 200, 50); // add theme!
+ glColor3ub(150, 200, 50); /* add theme! */
glLoadName(index & 0xFFFF);
pchan_draw_IK_root_lines(pchan, !(do_dashed & 2));
@@ -2205,7 +2207,7 @@
/* offset to parent */
if (eBone->parent) {
UI_ThemeColor(TH_WIRE);
- glLoadName(-1); // -1 here is OK!
+ glLoadName(-1); /* -1 here is OK! */
setlinestyle(3);
glBegin(GL_LINES);
@@ -2227,7 +2229,7 @@
/* finally names and axes */
if (arm->flag & (ARM_DRAWNAMES | ARM_DRAWAXES)) {
- // patch for several 3d cards (IBM mostly) that crash on GL_SELECT with text drawing
+ /* patch for several 3d cards (IBM mostly) that crash on GL_SELECT with text drawing */
if ((G.f & G_PICKSEL) == 0) {
float vec[3];
unsigned char col[4];
@@ -2574,7 +2576,7 @@
const float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, white);
glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
- glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); // only for lighting...
+ glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); /* only for lighting... */
}
/* arm->flag is being used to detect mode... */
Modified: trunk/blender/source/blender/editors/space_view3d/drawmesh.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2012-07-08 20:05:40 UTC (rev 48742)
+++ trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2012-07-08 20:36:00 UTC (rev 48743)
@@ -71,7 +71,7 @@
#include "ED_mesh.h"
#include "ED_uvedit.h"
-#include "view3d_intern.h" // own include
+#include "view3d_intern.h" /* own include */
/* user data structures for derived mesh callbacks */
typedef struct drawMeshFaceSelect_userData {
@@ -214,7 +214,7 @@
dm->drawMappedEdges(dm, draw_mesh_face_select__setSelectOpts, &data);
setlinestyle(0);
- bglPolygonOffset(rv3d->dist, 0.0); // resets correctly now, even after calling accumulated offsets
+ bglPolygonOffset(rv3d->dist, 0.0); /* resets correctly now, even after calling accumulated offsets */
BLI_edgehash_free(data.eh, NULL);
}
@@ -223,7 +223,7 @@
static Material *give_current_material_or_def(Object *ob, int matnr)
{
- extern Material defmaterial; // render module abuse...
+ extern Material defmaterial; /* render module abuse... */
Material *ma = give_current_material(ob, matnr);
return ma ? ma : &defmaterial;
@@ -248,7 +248,7 @@
static int c_lit;
static int c_has_texface;
- Object *litob = NULL; //to get mode to turn off mipmap in painting mode
+ Object *litob = NULL; /* to get mode to turn off mipmap in painting mode */
int backculled = GEMAT_BACKCULL;
int alphablend = 0;
int textured = 0;
@@ -317,7 +317,7 @@
if (lit != c_lit || ma != c_ma) {
if (lit) {
float spec[4];
- if (!ma) ma = give_current_material_or_def(NULL, 0); //default material
+ if (!ma) ma = give_current_material_or_def(NULL, 0); /* default material */
spec[0] = ma->spec * ma->specr;
spec[1] = ma->spec * ma->specg;
@@ -345,7 +345,7 @@
unsigned char obcol[4];
int is_tex, solidtex;
- // XXX scene->obedit warning
+ /* XXX scene->obedit warning */
/* texture draw is abused for mask selection mode, do this so wire draw
* with face selection in weight paint is not lit. */
@@ -705,8 +705,8 @@
- // The BM_FONT handling is in the gpu module, shared with the
- // game engine, was duplicated previously
+ /* The BM_FONT handling is in the gpu module, shared with the
+ * game engine, was duplicated previously */
set_property_valstr(prop, string);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list