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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-12-22 00:25:02 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-12-22 00:25:02 +0400
commit78e688b71ced5ea4f34cfc4b3d913cfebaedd461 (patch)
tree466028434a6a4e42e4be29056a9b72843cb69ccd /source/blender
parent924179bc00c0d56bcbc733da50933fcb8f0dacd1 (diff)
"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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c7
1 files changed, 7 insertions, 0 deletions
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)) {