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:
authorTon Roosendaal <ton@blender.org>2005-07-17 21:36:54 +0400
committerTon Roosendaal <ton@blender.org>2005-07-17 21:36:54 +0400
commitfdaf1c6eac741fedced835298f04d40c6974d19c (patch)
tree55a4a37c3381c51439fdcbef85f7460afc3edf48 /source/blender/src/drawarmature.c
parent099b3e786c7a8609812385aefe3eb0c108e42882 (diff)
Three fixes, thanks to irc reporting of Basse & Sten;
- Bone points for B-Bone drawing were not adjusted for size of Bone, now they draw same size as for other bone type - Deleting bones in editmode didn't check for constraints in Pose, causing weird collapsed poses or even crashes - ALT+S scaling on B-Bones in editmode didn't correct for the Object scale.
Diffstat (limited to 'source/blender/src/drawarmature.c')
-rw-r--r--source/blender/src/drawarmature.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c
index 13085f17484..395cfb7340f 100644
--- a/source/blender/src/drawarmature.c
+++ b/source/blender/src/drawarmature.c
@@ -332,7 +332,7 @@ static void draw_bone_solid_octahedral(void)
/* *************** Armature drawing, bones ******************* */
-static void draw_bone_points(int dt, int armflag, unsigned int boneflag, int id, float length)
+static void draw_bone_points(int dt, int armflag, unsigned int boneflag, int id)
{
/* Draw root point if we have no IK parent */
if (!(boneflag & BONE_IK_TOPARENT)){
@@ -366,12 +366,11 @@ static void draw_bone_points(int dt, int armflag, unsigned int boneflag, int id,
BIF_ThemeColor(TH_BONE_SOLID);
}
- glTranslatef(0.0, length, 0.0);
+ glTranslatef(0.0, 1.0, 0.0);
if(dt>OB_WIRE) draw_bonevert_solid();
else draw_bonevert();
- glTranslatef(0.0, -length, 0.0);
+ glTranslatef(0.0, -1.0, 0.0);
- if(length > 0.05f) length-= 0.05f; // make vertices visible
}
static void draw_b_bone_boxes(int dt, bPoseChannel *pchan, float xwidth, float length, float zwidth)
@@ -418,7 +417,12 @@ static void draw_b_bone(int dt, int armflag, int boneflag, int constflag, unsign
/* draw points only if... */
if(armflag & ARM_EDITMODE) {
- draw_bone_points(dt, armflag, boneflag, id, length);
+ /* move to unitspace */
+ glPushMatrix();
+ glScalef(length, length, length);
+ draw_bone_points(dt, armflag, boneflag, id);
+ glPopMatrix();
+ length*= 0.95f; // make vertices visible
}
/* colors for modes */
@@ -507,7 +511,7 @@ static void draw_bone(int dt, int armflag, int boneflag, int constflag, unsigned
}
- draw_bone_points(dt, armflag, boneflag, id, 1.0);
+ draw_bone_points(dt, armflag, boneflag, id);
/* now draw the bone itself */