Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_edit_mesh.c
| Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | static void overlay_edit_mesh_add_ob_to_pass(OVERLAY_PrivateData *pd, Object *ob, bool in_front) | ||||
| struct GPUBatch *geom_tris, *geom_verts, *geom_edges, *geom_fcenter, *skin_roots, *circle; | struct GPUBatch *geom_tris, *geom_verts, *geom_edges, *geom_fcenter, *skin_roots, *circle; | ||||
| DRWShadingGroup *vert_shgrp, *edge_shgrp, *fdot_shgrp, *face_shgrp, *skin_roots_shgrp; | DRWShadingGroup *vert_shgrp, *edge_shgrp, *fdot_shgrp, *face_shgrp, *skin_roots_shgrp; | ||||
| bool has_edit_mesh_cage = false; | bool has_edit_mesh_cage = false; | ||||
| bool has_skin_roots = false; | bool has_skin_roots = false; | ||||
| /* TODO: Should be its own function. */ | /* TODO: Should be its own function. */ | ||||
| Mesh *me = (Mesh *)ob->data; | Mesh *me = (Mesh *)ob->data; | ||||
| BMEditMesh *embm = me->edit_mesh; | BMEditMesh *embm = me->edit_mesh; | ||||
| EditMeshEval *em_eval = &me->runtime.edit_eval; | |||||
| if (embm) { | if (embm) { | ||||
| has_edit_mesh_cage = embm->mesh_eval_cage && (embm->mesh_eval_cage != embm->mesh_eval_final); | has_edit_mesh_cage = em_eval->mesh_cage && (em_eval->mesh_cage != em_eval->mesh_final); | ||||
| has_skin_roots = CustomData_get_offset(&embm->bm->vdata, CD_MVERT_SKIN) != -1; | has_skin_roots = CustomData_get_offset(&embm->bm->vdata, CD_MVERT_SKIN) != -1; | ||||
| } | } | ||||
| vert_shgrp = pd->edit_mesh_verts_grp[in_front]; | vert_shgrp = pd->edit_mesh_verts_grp[in_front]; | ||||
| edge_shgrp = pd->edit_mesh_edges_grp[in_front]; | edge_shgrp = pd->edit_mesh_edges_grp[in_front]; | ||||
| fdot_shgrp = pd->edit_mesh_facedots_grp[in_front]; | fdot_shgrp = pd->edit_mesh_facedots_grp[in_front]; | ||||
| face_shgrp = (has_edit_mesh_cage) ? pd->edit_mesh_faces_cage_grp[in_front] : | face_shgrp = (has_edit_mesh_cage) ? pd->edit_mesh_faces_cage_grp[in_front] : | ||||
| pd->edit_mesh_faces_grp[in_front]; | pd->edit_mesh_faces_grp[in_front]; | ||||
| ▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines | |||||