Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/uvedit/uvedit_select.c
| Show First 20 Lines • Show All 2,508 Lines • ▼ Show 20 Lines | if (found) { | ||||
| BMEditMesh *em = BKE_editmesh_from_object(obedit); | BMEditMesh *em = BKE_editmesh_from_object(obedit); | ||||
| const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); | const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); | ||||
| if (selectmode == UV_SELECT_FACE) { | if (selectmode == UV_SELECT_FACE) { | ||||
| is_selected = uvedit_face_select_test(scene, hit.efa, cd_loop_uv_offset); | is_selected = uvedit_face_select_test(scene, hit.efa, cd_loop_uv_offset); | ||||
| } | } | ||||
| else if (selectmode == UV_SELECT_EDGE) { | else if (selectmode == UV_SELECT_EDGE) { | ||||
| is_selected = uvedit_edge_select_test(scene, hit.l, cd_loop_uv_offset); | is_selected = uvedit_edge_select_test(scene, hit.l, cd_loop_uv_offset); | ||||
| } | } | ||||
| else { /* Vertex or island. */ | else { /* Vertex or island. | ||||
| * For island (and if we were using uv_find_nearest_face_multi_ex, see above),hit.l is | |||||
| * NULL, use hit.efa instead. */ | |||||
| if (hit.l != NULL) { | |||||
| is_selected = uvedit_uv_select_test(scene, hit.l, cd_loop_uv_offset); | is_selected = uvedit_uv_select_test(scene, hit.l, cd_loop_uv_offset); | ||||
| } | } | ||||
| else { | |||||
| is_selected = uvedit_face_select_test(scene, hit.efa, cd_loop_uv_offset); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| if (params->sel_op == SEL_OP_SET) { | if (params->sel_op == SEL_OP_SET) { | ||||
| if ((found && params->select_passthrough) && is_selected) { | if ((found && params->select_passthrough) && is_selected) { | ||||
| found = false; | found = false; | ||||
| } | } | ||||
| else if (found || params->deselect_all) { | else if (found || params->deselect_all) { | ||||
| /* Deselect everything. */ | /* Deselect everything. */ | ||||
| ▲ Show 20 Lines • Show All 2,245 Lines • Show Last 20 Lines | |||||