diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-12 22:12:01 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-08-12 22:12:42 +0400 |
commit | 4bd252d8c3924361782998760523e25452594d21 (patch) | |
tree | afe66f0fc192dac37b35435465022d73f8afd201 | |
parent | 7c7cb01aa5641414d9f0c39ab81df0f57205f362 (diff) |
Fix T41415: Lasso keymap not working in UV editor.
Extend option was not implemented for UV lasso select...
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 0d8b5a524b6..4b341547370 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -3036,7 +3036,8 @@ static void UV_OT_circle_select(wmOperatorType *ot) /* ******************** lasso select operator **************** */ -static bool do_lasso_select_mesh_uv(bContext *C, const int mcords[][2], short moves, const bool select) +static bool do_lasso_select_mesh_uv(bContext *C, const int mcords[][2], short moves, + const bool select, const bool extend) { SpaceImage *sima = CTX_wm_space_image(C); Image *ima = CTX_data_edit_image(C); @@ -3063,6 +3064,10 @@ static bool do_lasso_select_mesh_uv(bContext *C, const int mcords[][2], short mo BLI_lasso_boundbox(&rect, mcords, moves); + if (!extend && select) { + uv_select_all_perform(scene, ima, em, SEL_DESELECT); + } + if (use_face_center) { /* Face Center Sel */ BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { BM_elem_flag_disable(efa, BM_ELEM_TAG); @@ -3125,11 +3130,12 @@ static int uv_lasso_select_exec(bContext *C, wmOperator *op) const int (*mcords)[2] = WM_gesture_lasso_path_to_array(C, op, &mcords_tot); if (mcords) { - bool select; + bool select, extend; bool changed; select = !RNA_boolean_get(op->ptr, "deselect"); - changed = do_lasso_select_mesh_uv(C, mcords, mcords_tot, select); + extend = RNA_boolean_get(op->ptr, "extend"); + changed = do_lasso_select_mesh_uv(C, mcords, mcords_tot, select, extend); MEM_freeN((void *)mcords); |