Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-09 00:36:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-09 00:36:00 +0400
commit0361909ab4e0f41c631ef4654345b0034bb89d51 (patch)
tree49c5b7f181ac1c3d025702f753c0306d71d0fe88 /source/blender/editors/space_view3d/drawarmature.c
parent9af3e3bb9b220a5eba45e964bbec9cd49b707947 (diff)
style cleanup
Diffstat (limited to 'source/blender/editors/space_view3d/drawarmature.c')
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c50
1 files changed, 26 insertions, 24 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index cdaf7d5690f..48b3672c144 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -686,13 +686,13 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel
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 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned
/* 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 @@ static void draw_b_bone(const short dt, int armflag, int boneflag, short constfl
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 @@ static void draw_wire_bone_segments(bPoseChannel *pchan, Mat4 *bbones, float len
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 @@ static void draw_wire_bone(const short dt, int armflag, int boneflag, short cons
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 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp)
/* 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 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp)
/* 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 @@ static void draw_pose_dofs(Object *ob)
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 @@ static void draw_pose_dofs(Object *ob)
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 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
}
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 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
}
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 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
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 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
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 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
/* 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 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
/* 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 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
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... */