Permalink
Browse files

Allow selecting area lights from all sides

Starting from d7f0aca, area lights
use proper holes as their backside (instead of the _hole_ material).
Therefore, it is no longer possible select an area light from the
back side.

Disable back face culling when picking area lights to allow they
to be selected from both sides.

NOTE: Area lights can now be selected from both sides, not only
from the front face. (Thanks to Micheus.) [bjorng]
  • Loading branch information...
1 parent d2c1975 commit 628d098a522a651f2f8efea1c3a3a761bcd87611 @bjorng bjorng committed Sep 29, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/wings_pick.erl
View
@@ -852,6 +852,12 @@ do_dlo_pick(D=#dlo{vab=none}, St, OneHit, Acc) ->
do_dlo_pick(wings_draw_setup:work(D, St), St, OneHit, Acc);
do_dlo_pick(D=#dlo{vab=#vab{face_vs=none}}, St, OneHit, Acc) ->
do_dlo_pick(wings_draw_setup:work(D, St), St, OneHit, Acc);
+do_dlo_pick(#dlo{mirror=none,src_we=#we{id=Id}=We}=D, _, OneHit, Acc)
+ when ?IS_AREA_LIGHT(We) ->
+ wpc_pick:cull(false),
+ Res = do_dlo_pick_0(Id, D, OneHit, Acc),
+ wpc_pick:cull(true),
+ Res;
do_dlo_pick(#dlo{mirror=none,src_we=#we{id=Id}}=D, _, OneHit, Acc) ->
do_dlo_pick_0(Id, D, OneHit, Acc);
do_dlo_pick(#dlo{mirror=Matrix,src_we=#we{id=Id}}=D0, _, OneHit, Acc0) ->

0 comments on commit 628d098

Please sign in to comment.