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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-14 16:04:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-14 16:04:00 +0400
commitbe5b447100710b8b81ed6c683cfc5ca34b866d1b (patch)
tree16345097c63e1f4b092c49ce99e98f5c7926f3a7 /source/blender/editors/uvedit
parent4f2c83f573472c69f7f72762a34e1158433a06b6 (diff)
lasso select for movie clip markers.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 53bf19c04cc..595d1905e16 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -2636,7 +2636,7 @@ static void UV_OT_circle_select(wmOperatorType *ot)
/* ******************** lasso select operator **************** */
-static void do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, short select)
+static int do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, short select)
{
Image *ima = CTX_data_edit_image(C);
ARegion *ar = CTX_wm_region(C);
@@ -2695,6 +2695,7 @@ static void do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, s
}
}
}
+
if (change) {
uv_select_sync_flush(scene->toolsettings, em, select);
@@ -2702,6 +2703,8 @@ static void do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, s
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
}
}
+
+ return change;
}
static int uv_lasso_select_exec(bContext *C, wmOperator *op)
@@ -2725,9 +2728,14 @@ static int uv_lasso_select_exec(bContext *C, wmOperator *op)
short select;
select = !RNA_boolean_get(op->ptr, "deselect");
- do_lasso_select_mesh_uv(C, mcords, i, select);
- return OPERATOR_FINISHED;
+ if (do_lasso_select_mesh_uv(C, mcords, i, select)) {
+ return OPERATOR_FINISHED;
+ }
+ else {
+ return OPERATOR_CANCELLED;
+ }
+
}
return OPERATOR_PASS_THROUGH;
}