"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.
This commit is contained in:
Bastien Montagne 2012-12-21 20:25:02 +00:00
parent 924179bc00
commit 78e688b71c

@ -1286,6 +1286,13 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
glVertex3fv(vvec_clip); glVertex3fv(vvec_clip);
glEnd(); 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)) { else if (ELEM(la->type, LA_HEMI, LA_SUN)) {