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>2013-03-21 22:57:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-21 22:57:05 +0400
commit21c55d5304f5e1093d0f8e96cec5bd1014b08c16 (patch)
tree1d390bb2acfde545288d3f7efa5c07aa73ba8279 /source/blender/editors
parent9713d5e740a4678e73eb6977a13b4c049413c06e (diff)
mist line can now be used for camera selection.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index fa23139b382..9e8ab735564 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1409,7 +1409,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
}
}
-static void draw_limit_line(float sta, float end, unsigned int col)
+static void draw_limit_line(float sta, float end, const short dflag, unsigned int col)
{
glBegin(GL_LINES);
glVertex3f(0.0, 0.0, -sta);
@@ -1418,7 +1418,9 @@ static void draw_limit_line(float sta, float end, unsigned int col)
glPointSize(3.0);
glBegin(GL_POINTS);
- cpack(col);
+ if (!(dflag & (DRAW_PICKING | DRAW_CONSTCOLOR | DRAW_SCENESET))) {
+ cpack(col);
+ }
glVertex3f(0.0, 0.0, -sta);
glVertex3f(0.0, 0.0, -end);
glEnd();
@@ -1763,10 +1765,9 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
glEnd();
}
- if (dflag == 0) {
- if (cam->flag & (CAM_SHOWLIMITS + CAM_SHOWMIST)) {
+ if ((dflag & DRAW_SCENESET) == 0) {
+ if (cam->flag & (CAM_SHOWLIMITS | CAM_SHOWMIST)) {
float nobmat[4][4];
- World *wrld;
/* draw in normalized object matrix space */
copy_m4_m4(nobmat, ob->obmat);
@@ -1777,15 +1778,17 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
glMultMatrixf(nobmat);
if (cam->flag & CAM_SHOWLIMITS) {
- draw_limit_line(cam->clipsta, cam->clipend, 0x77FFFF);
+ draw_limit_line(cam->clipsta, cam->clipend, dflag, 0x77FFFF);
/* qdn: was yafray only, now also enabled for Blender to be used with defocus composite node */
draw_focus_cross(BKE_camera_object_dof_distance(ob), cam->drawsize);
}
- wrld = scene->world;
- if (cam->flag & CAM_SHOWMIST)
- if (wrld) draw_limit_line(wrld->miststa, wrld->miststa + wrld->mistdist, 0xFFFFFF);
-
+ if (cam->flag & CAM_SHOWMIST) {
+ World *world = scene->world;
+ if (world) {
+ draw_limit_line(world->miststa, world->miststa + world->mistdist, dflag, 0xFFFFFF);
+ }
+ }
glPopMatrix();
}
}