Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/uvedit/uvedit_select.c
| Show First 20 Lines • Show All 2,116 Lines • ▼ Show 20 Lines | |||||
| static int uv_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) | static int uv_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| { | { | ||||
| const ARegion *region = CTX_wm_region(C); | const ARegion *region = CTX_wm_region(C); | ||||
| float co[2]; | float co[2]; | ||||
| UI_view2d_region_to_view(®ion->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); | UI_view2d_region_to_view(®ion->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); | ||||
| RNA_float_set_array(op->ptr, "location", co); | RNA_float_set_array(op->ptr, "location", co); | ||||
| return uv_select_exec(C, op); | int retval = uv_select_exec(C, op); | ||||
| /* Only finish + pass through for press events (allowing press-tweak). */ | |||||
| if ((event->val != KM_PRESS) && | |||||
| ((retval & OPERATOR_PASS_THROUGH) && (retval & OPERATOR_FINISHED))) { | |||||
| retval &= ~OPERATOR_PASS_THROUGH; | |||||
| } | |||||
| return retval; | |||||
| } | } | ||||
| void UV_OT_select(wmOperatorType *ot) | void UV_OT_select(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Select"; | ot->name = "Select"; | ||||
| ot->description = "Select UV vertices"; | ot->description = "Select UV vertices"; | ||||
| ot->idname = "UV_OT_select"; | ot->idname = "UV_OT_select"; | ||||
| ▲ Show 20 Lines • Show All 1,812 Lines • Show Last 20 Lines | |||||