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>2016-02-22 19:24:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-22 19:24:30 +0300
commit37915e0b792766555dd1fc0356d53fcec3fa924e (patch)
tree94b7cafaf66bc1c1a1bb71bb0d77d321b2880f56
parent27f5a01056b9e707dd007c3d2a95a2fcaff6ce48 (diff)
Don't draw object center when outside the view
-rw-r--r--source/blender/editors/space_view3d/drawobject.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 5a989155d3a..b9363cae1f4 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -8068,7 +8068,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if (do_draw_center != -1) {
if (dflag & DRAW_PICKING) {
/* draw a single point for opengl selection */
- if (U.obcenter_dia > 0) {
+ if ((base->sx != IS_CLIPPED) &&
+ (U.obcenter_dia != 0.0))
+ {
glPointSize(U.obcenter_dia);
glBegin(GL_POINTS);
glVertex3fv(ob->obmat[3]);
@@ -8077,7 +8079,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
}
else if ((dflag & DRAW_CONSTCOLOR) == 0) {
/* we don't draw centers for duplicators and sets */
- if (U.obcenter_dia > 0 && !(G.f & G_RENDER_OGL)) {
+ if ((base->sx != IS_CLIPPED) &&
+ (U.obcenter_dia != 0.0) &&
+ !(G.f & G_RENDER_OGL))
+ {
/* 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);
}