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>2010-01-03 04:55:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-03 04:55:20 +0300
commite2f5d31453c8893ad072951e7bceeb3ad549ee17 (patch)
tree6fe30cc66bca6f52149908d6a64df99e01aa4a06 /source/blender/editors/space_view3d/drawobject.c
parent18d37648bad53e655de2554c12e991a2210bfd76 (diff)
dont draw object centers when drawing the depth buffer, grease pencil would get its depth messed up by object centers when with 'Surface' mode.
Also fix own error with drawing grease pencil depths, wasnt setting v3d->zbuf back to its original value.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index c689b4d338f..66790d9b7f0 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -798,25 +798,28 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
curcol[3]= 0.6;
glColor4fv(curcol);
- if(ob->id.us>1) {
- if (ob==OBACT || (ob->flag & SELECT)) glColor4ub(0x88, 0xFF, 0xFF, 155);
- else glColor4ub(0x77, 0xCC, 0xCC, 155);
- }
-
- /* Inner Circle */
- VECCOPY(vec, ob->obmat[3]);
- glEnable(GL_BLEND);
- drawcircball(GL_LINE_LOOP, vec, lampsize, imat);
- glDisable(GL_BLEND);
- drawcircball(GL_POLYGON, vec, lampsize, imat);
-
- /* restore */
- if(ob->id.us>1)
- glColor4fv(curcol);
+ if(lampsize > 0.0f) {
+
+ if(ob->id.us>1) {
+ if (ob==OBACT || (ob->flag & SELECT)) glColor4ub(0x88, 0xFF, 0xFF, 155);
+ else glColor4ub(0x77, 0xCC, 0xCC, 155);
+ }
+
+ /* Inner Circle */
+ VECCOPY(vec, ob->obmat[3]);
+ glEnable(GL_BLEND);
+ drawcircball(GL_LINE_LOOP, vec, lampsize, imat);
+ glDisable(GL_BLEND);
+ drawcircball(GL_POLYGON, vec, lampsize, imat);
- /* Outer circle */
- circrad = 3.0f*lampsize;
- drawcircball(GL_LINE_LOOP, vec, circrad, imat);
+ /* restore */
+ if(ob->id.us>1)
+ glColor4fv(curcol);
+
+ /* Outer circle */
+ circrad = 3.0f*lampsize;
+ drawcircball(GL_LINE_LOOP, vec, circrad, imat);
+ }
setlinestyle(3);
@@ -6154,7 +6157,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
else if((flag & DRAW_CONSTCOLOR)==0) {
/* we don't draw centers for duplicators and sets */
- drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ob->id.lib || ob->id.us>1);
+ if(U.obcenter_dia > 0) {
+ /* check > 0 otherwise grease pencil can draw into the circle select which is annoying. */
+ drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ob->id.lib || ob->id.us>1);
+ }
}
}
}