diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-15 17:07:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-15 17:07:36 +0400 |
commit | 4828d0cba0e621d8e8b1cf3f3b3d00e8d83b861a (patch) | |
tree | 8b2e33a0631114cc94387e59d91ddf683a9e50de /source/blender/editors/space_view3d | |
parent | 2ac0a5637ce43e5f812e2b9ee1e03fb7adefb71b (diff) |
bugfix [#23830] Border selecting bones in editmode bug
was missing a call to glLoadName(-1); so drawing commands after the bone were taken into account with the selection.
made some other minor changes that dont change functionality.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawarmature.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index adff6ffdc65..50798429801 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -310,7 +310,7 @@ static void drawsolidcube_size(float xsize, float ysize, float zsize) if(displist==0) { displist= glGenLists(1); - glNewList(displist, GL_COMPILE_AND_EXECUTE); + glNewList(displist, GL_COMPILE); glBegin(GL_QUADS); n[0]= -1.0; @@ -340,19 +340,17 @@ static void drawsolidcube_size(float xsize, float ysize, float zsize) glEndList(); } - else glCallList(displist); - + + glCallList(displist); } static void drawcube_size(float xsize, float ysize, float zsize) { static GLuint displist=0; - glScalef(xsize, ysize, zsize); - if(displist == 0) { displist= glGenLists(1); - glNewList(displist, GL_COMPILE_AND_EXECUTE); + glNewList(displist, GL_COMPILE); glBegin(GL_LINE_STRIP); glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]); @@ -368,7 +366,9 @@ static void drawcube_size(float xsize, float ysize, float zsize) glEndList(); } - else glCallList(displist); + + glScalef(xsize, ysize, zsize); + glCallList(displist); } @@ -381,7 +381,7 @@ static void draw_bonevert(void) GLUquadricObj *qobj; displist= glGenLists(1); - glNewList(displist, GL_COMPILE_AND_EXECUTE); + glNewList(displist, GL_COMPILE); glPushMatrix(); @@ -400,8 +400,8 @@ static void draw_bonevert(void) glPopMatrix(); glEndList(); } - else - glCallList(displist); + + glCallList(displist); } static void draw_bonevert_solid(void) @@ -412,7 +412,7 @@ static void draw_bonevert_solid(void) GLUquadricObj *qobj; displist= glGenLists(1); - glNewList(displist, GL_COMPILE_AND_EXECUTE); + glNewList(displist, GL_COMPILE); qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_FILL); @@ -423,8 +423,8 @@ static void draw_bonevert_solid(void) glEndList(); } - else - glCallList(displist); + + glCallList(displist); } static void draw_bone_octahedral() @@ -435,7 +435,7 @@ static void draw_bone_octahedral() float vec[6][3]; displist= glGenLists(1); - glNewList(displist, GL_COMPILE_AND_EXECUTE); + glNewList(displist, GL_COMPILE); vec[0][0]= vec[0][1]= vec[0][2]= 0.0f; vec[5][0]= vec[5][2]= 0.0f; vec[5][1]= 1.0f; @@ -467,8 +467,8 @@ static void draw_bone_octahedral() glEndList(); } - else - glCallList(displist); + + glCallList(displist); } static void draw_bone_solid_octahedral(void) @@ -479,7 +479,7 @@ static void draw_bone_solid_octahedral(void) float vec[6][3], nor[3]; displist= glGenLists(1); - glNewList(displist, GL_COMPILE_AND_EXECUTE); + glNewList(displist, GL_COMPILE); vec[0][0]= vec[0][1]= vec[0][2]= 0.0f; vec[5][0]= vec[5][2]= 0.0f; vec[5][1]= 1.0f; @@ -529,8 +529,8 @@ static void draw_bone_solid_octahedral(void) glEndList(); } - else - glCallList(displist); + + glCallList(displist); } /* *************** Armature drawing, bones ******************* */ @@ -1933,7 +1933,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - for (eBone=arm->edbo->first, index=0; eBone; eBone=eBone->next, index++) { + for (eBone=arm->edbo->first; eBone; eBone=eBone->next) { if (eBone->layer & arm->layer) { if ((eBone->flag & (BONE_HIDDEN_A|BONE_NO_DEFORM))==0) { if (eBone->flag & (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL)) @@ -1949,7 +1949,6 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) /* if solid we draw it first */ if ((dt > OB_WIRE) && (arm->drawtype!=ARM_LINE)) { - index= 0; for (eBone=arm->edbo->first, index=0; eBone; eBone=eBone->next, index++) { if (eBone->layer & arm->layer) { if ((eBone->flag & BONE_HIDDEN_A)==0) { @@ -2043,6 +2042,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) } /* restore */ + if(index!=-1) glLoadName(-1); if (arm->drawtype==ARM_LINE); else if (dt>OB_WIRE) bglPolygonOffset(rv3d->dist, 0.0f); @@ -2054,7 +2054,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - for (eBone=arm->edbo->first, index=0; eBone; eBone=eBone->next, index++) { + for (eBone=arm->edbo->first; eBone; eBone=eBone->next) { if(eBone->layer & arm->layer) { if ((eBone->flag & BONE_HIDDEN_A)==0) { |