Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_edit_uv.cc
| Show First 20 Lines • Show All 436 Lines • ▼ Show 20 Lines | static void overlay_edit_uv_cache_populate(OVERLAY_Data *vedata, Object *ob) | ||||
| OVERLAY_StorageList *stl = vedata->stl; | OVERLAY_StorageList *stl = vedata->stl; | ||||
| OVERLAY_PrivateData *pd = stl->pd; | OVERLAY_PrivateData *pd = stl->pd; | ||||
| GPUBatch *geom; | GPUBatch *geom; | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| const bool is_edit_object = DRW_object_is_in_edit_mode(ob); | const bool is_edit_object = DRW_object_is_in_edit_mode(ob); | ||||
| Mesh *me = (Mesh *)ob->data; | Mesh *me = (Mesh *)ob->data; | ||||
| const bool has_active_object_uvmap = CustomData_get_active_layer(&me->ldata, CD_MLOOPUV) != -1; | const bool has_active_object_uvmap = CustomData_get_active_layer(&me->ldata, CD_PROP_FLOAT2) != | ||||
| -1; | |||||
| const bool has_active_edit_uvmap = is_edit_object && | const bool has_active_edit_uvmap = is_edit_object && | ||||
| (CustomData_get_active_layer(&me->edit_mesh->bm->ldata, | (CustomData_get_active_layer(&me->edit_mesh->bm->ldata, | ||||
| CD_MLOOPUV) != -1); | CD_PROP_FLOAT2) != -1); | ||||
| const bool draw_shadows = (draw_ctx->object_mode != OB_MODE_OBJECT) && | const bool draw_shadows = (draw_ctx->object_mode != OB_MODE_OBJECT) && | ||||
| (ob->mode == draw_ctx->object_mode); | (ob->mode == draw_ctx->object_mode); | ||||
| if (has_active_edit_uvmap) { | if (has_active_edit_uvmap) { | ||||
| if (pd->edit_uv.do_uv_overlay) { | if (pd->edit_uv.do_uv_overlay) { | ||||
| geom = DRW_mesh_batch_cache_get_edituv_edges(ob, me); | geom = DRW_mesh_batch_cache_get_edituv_edges(ob, me); | ||||
| if (geom) { | if (geom) { | ||||
| DRW_shgroup_call_obmat(pd->edit_uv_edges_grp, geom, nullptr); | DRW_shgroup_call_obmat(pd->edit_uv_edges_grp, geom, nullptr); | ||||
| ▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines | |||||