Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_tools.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 2,088 Lines • ▼ Show 20 Lines | static int edbm_hide_exec(bContext *C, wmOperator *op) | ||||
| Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( | Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( | ||||
| view_layer, CTX_wm_view3d(C), &objects_len); | view_layer, CTX_wm_view3d(C), &objects_len); | ||||
| for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | ||||
| Object *obedit = objects[ob_index]; | Object *obedit = objects[ob_index]; | ||||
| BMEditMesh *em = BKE_editmesh_from_object(obedit); | BMEditMesh *em = BKE_editmesh_from_object(obedit); | ||||
| BMesh *bm = em->bm; | BMesh *bm = em->bm; | ||||
| if (unselected) { | if (unselected) { | ||||
| if (em->selectmode & SCE_SELECT_VERTEX) { | |||||
| if (bm->totvertsel == bm->totvert) { | if (bm->totvertsel == bm->totvert) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| else if (em->selectmode & SCE_SELECT_EDGE) { | |||||
| if (bm->totedgesel == bm->totedge) { | |||||
| continue; | |||||
| } | |||||
| } | |||||
| else if (em->selectmode & SCE_SELECT_FACE) { | |||||
| if (bm->totfacesel == bm->totface) { | |||||
| continue; | |||||
| } | |||||
| } | |||||
| } | |||||
| else { | else { | ||||
| if (bm->totvertsel == 0) { | if (bm->totvertsel == 0) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| if (EDBM_mesh_hide(em, unselected)) { | if (EDBM_mesh_hide(em, unselected)) { | ||||
| EDBM_update_generic(em, true, false); | EDBM_update_generic(em, true, false); | ||||
| ▲ Show 20 Lines • Show All 7,031 Lines • Show Last 20 Lines | |||||