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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-12-05 13:52:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-12-05 13:52:14 +0300
commit8493fa986bfd01c4d7e98d8afbccbfec44f78d5b (patch)
tree77381effaf81c4ca8b452d4e7b733792a7f02915 /source
parentaa39d56692f63cfd9a6d61bbf813e8c570600037 (diff)
dont draw face dots when solidtex is enabled - added a macro to check this.
relax pose was crashing - missing a check.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_object_types.h11
-rw-r--r--source/blender/src/drawobject.c8
-rw-r--r--source/blender/src/editmesh_mods.c2
-rw-r--r--source/blender/src/poseobject.c2
4 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index f2c8b57571b..1080388bfab 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -313,7 +313,16 @@ extern Object workob;
#define OB_TEXTURE 5
/* this condition has been made more complex since editmode can draw textures */
-#define CHECK_OB_DRAWTEXTURE(vd, dt) ((vd->drawtype==OB_TEXTURE && dt>OB_SOLID) || (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX))
+#define CHECK_OB_DRAWTEXTURE(vd, dt) \
+ ((vd->drawtype==OB_TEXTURE && dt>OB_SOLID) || \
+ (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX))
+
+#define CHECK_OB_DRAWFACEDOT(sce, vd, dt) \
+ ( (sce->selectmode & SCE_SELECT_FACE) && \
+ (vd->drawtype<=OB_SOLID) && \
+ (((vd->drawtype==OB_SOLID) && (dt>=OB_SOLID) && (vd->flag2 & V3D_SOLID_TEX) && (vd->flag & V3D_ZBUF_SELECT)) == 0) \
+ )
+
/* dtx: flags, char! */
#define OB_AXIS 2
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 7752952381c..c91c335c004 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -1698,9 +1698,7 @@ static void draw_em_fancy_verts(EditMesh *em, DerivedMesh *cageDM, EditVert *eve
draw_dm_verts(cageDM, sel, eve_act);
}
- if( (G.scene->selectmode & SCE_SELECT_FACE) &&
- (G.vd->drawtype<=OB_SOLID)
- ) {
+ if( CHECK_OB_DRAWFACEDOT(G.scene, G.vd, G.obedit->dt) ) {
glPointSize(fsize);
glColor4ubv((GLubyte *)fcol);
draw_dm_face_centers(cageDM, sel);
@@ -5329,9 +5327,7 @@ static int bbs_mesh_solid_EM(DerivedMesh *dm, int facecol)
if (facecol) {
dm->drawMappedFaces(dm, bbs_mesh_solid__setSolidDrawOptions, (void*)(long) 1, 0);
- if( (G.scene->selectmode & SCE_SELECT_FACE) &&
- (G.vd->drawtype<=OB_SOLID)
- ) {
+ if( CHECK_OB_DRAWFACEDOT(G.scene, G.vd, G.obedit->dt) ) {
glPointSize(BIF_GetThemeValuef(TH_FACEDOT_SIZE));
bglBegin(GL_POINTS);
diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c
index a74bd851aeb..b165a141daa 100644
--- a/source/blender/src/editmesh_mods.c
+++ b/source/blender/src/editmesh_mods.c
@@ -714,7 +714,7 @@ static void unified_select_draw(EditVert *eve, EditEdge *eed, EditFace *efa)
}
}
- if(G.scene->selectmode & SCE_SELECT_FACE && (G.vd->drawtype!=OB_TEXTURE)) {
+ if( CHECK_OB_DRAWFACEDOT(G.scene, G.vd, G.obedit->dt) ) {
if(efa->fgonf==0) {
glPointSize(BIF_GetThemeValuef(TH_FACEDOT_SIZE));
BIF_ThemeColor((efa->f & SELECT)?TH_FACE_DOT:TH_WIRE);
diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c
index eef84468171..fe72938b106 100644
--- a/source/blender/src/poseobject.c
+++ b/source/blender/src/poseobject.c
@@ -1168,7 +1168,7 @@ void pose_relax()
if(pchan->bone->flag & BONE_SELECTED) {
/* do we have an ipo curve? */
achan= get_action_channel(act, pchan->name);
- if(achan->ipo) {
+ if(achan && achan->ipo) {
/*calc_ipo(achan->ipo, ctime);*/
do_loc += pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_X), framef, &pchan->loc[0], NULL, NULL);
do_loc += pose_relax_icu(find_ipocurve(achan->ipo, AC_LOC_Y), framef, &pchan->loc[1], NULL, NULL);