From 78e688b71ced5ea4f34cfc4b3d913cfebaedd461 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 21 Dec 2012 20:25:02 +0000 Subject: [PATCH] "Fix" for [#33524] Interaction of "Size" & "Distance" sliders in "Spot Lamp" panel with "3D view" Simply added a dashed line materializing the center/direction of the spot, and ending at Distance from it (exactly as for the Area lamp). We already had something similar for buffered shadow spots (to materialize start/end clipping), and imho it's also quite useful to see *where* points a spot, when using wide spots! Very easy to revert anyway. --- source/blender/editors/space_view3d/drawobject.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 1ec0e52292c..e8cd1b7c219 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1286,6 +1286,13 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glVertex3fv(vvec_clip); glEnd(); } + /* Else, draw spot direction (using distance as end limit, same as for Area lamp). */ + else { + glBegin(GL_LINE_STRIP); + glVertex3f(0.0, 0.0, -circrad); + glVertex3f(0.0, 0.0, -la->dist); + glEnd(); + } } else if (ELEM(la->type, LA_HEMI, LA_SUN)) {