diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-26 16:40:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-26 16:40:47 +0300 |
commit | f2c9eff803ce14f92816c58fb52216bb9c45a6dd (patch) | |
tree | e6c655b744add37db8d271e0300fc7408bfe2cf5 /source/blender/editors/physics | |
parent | a44acdf348693ed5b6d64c1a84969578a513c0f6 (diff) |
lasso select wasn't comparing the depth with particle selection, where border and circle select do.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index f27387a9e65..37a75d51bf0 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1608,12 +1608,17 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s float co[3], mat[4][4]; short vertco[2]; + PEData data; + if(!PE_start_edit(edit)) return OPERATOR_CANCELLED; if (extend == 0 && select) PE_deselect_all_visible(edit); - + + /* only for depths */ + PE_set_view3d_data(C, &data); + unit_m4(mat); LOOP_VISIBLE_POINTS { @@ -1625,7 +1630,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s VECCOPY(co, key->co); mul_m4_v3(mat, co); project_short(ar, co, vertco); - if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])) { + if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) { if(select && !(key->flag & PEK_SELECT)) { key->flag |= PEK_SELECT; point->flag |= PEP_EDIT_RECALC; @@ -1643,7 +1648,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s VECCOPY(co, key->co); mul_m4_v3(mat, co); project_short(ar, co,vertco); - if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])) { + if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) { if(select && !(key->flag & PEK_SELECT)) { key->flag |= PEK_SELECT; point->flag |= PEP_EDIT_RECALC; |