Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/paint_weight_mode.c
| Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | if ((ob->type == OB_MESH) && (ob == draw_ctx->obact)) { | ||||
| const Mesh *me = ob->data; | const Mesh *me = ob->data; | ||||
| const bool use_wire = (v3d->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE) != 0; | const bool use_wire = (v3d->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE) != 0; | ||||
| const bool use_surface = v3d->overlay.weight_paint_mode_opacity != 0.0f; | const bool use_surface = v3d->overlay.weight_paint_mode_opacity != 0.0f; | ||||
| const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; | const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; | ||||
| const bool use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; | const bool use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; | ||||
| struct GPUBatch *geom; | struct GPUBatch *geom; | ||||
| if (use_surface) { | if (use_surface) { | ||||
| geom = DRW_cache_mesh_surface_weights_get(ob); | geom = DRW_cache_mesh_surface_weights_get(ob, draw_ctx->scene->toolsettings, true); | ||||
| DRW_shgroup_call_add(stl->g_data->fweights_shgrp, geom, ob->obmat); | DRW_shgroup_call_add(stl->g_data->fweights_shgrp, geom, ob->obmat); | ||||
| } | } | ||||
| if (use_face_sel || use_wire) { | if (use_face_sel || use_wire) { | ||||
| geom = DRW_cache_mesh_edges_paint_overlay_get(ob, use_wire, use_face_sel); | geom = DRW_cache_mesh_edges_paint_overlay_get(ob, use_wire, use_face_sel); | ||||
| DRW_shgroup_call_add(stl->g_data->lwire_shgrp, geom, ob->obmat); | DRW_shgroup_call_add(stl->g_data->lwire_shgrp, geom, ob->obmat); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||