diff options
Diffstat (limited to 'source/blender/draw/modes/paint_vertex_mode.c')
-rw-r--r-- | source/blender/draw/modes/paint_vertex_mode.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c index 9ff49a27645..7efa13f1312 100644 --- a/source/blender/draw/modes/paint_vertex_mode.c +++ b/source/blender/draw/modes/paint_vertex_mode.c @@ -34,6 +34,7 @@ #include "draw_mode_engines.h" #include "DNA_mesh_types.h" +#include "DNA_view3d_types.h" extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */ extern struct GlobalsUboStorage ts; /* draw_common.c */ @@ -139,11 +140,11 @@ static void PAINT_VERTEX_cache_populate(void *vedata, Object *ob) { PAINT_VERTEX_StorageList *stl = ((PAINT_VERTEX_Data *)vedata)->stl; const DRWContextState *draw_ctx = DRW_context_state_get(); + const View3D *v3d = draw_ctx->v3d; if ((ob->type == OB_MESH) && (ob == draw_ctx->obact)) { - IDProperty *ces_mode_pw = BKE_layer_collection_engine_evaluated_get(ob, COLLECTION_MODE_PAINT_VERTEX, ""); const Mesh *me = ob->data; - const bool use_wire = BKE_collection_engine_property_value_get_bool(ces_mode_pw, "use_wire"); + const bool use_wire = (v3d->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE) != 0; const bool use_surface = DRW_object_is_mode_shade(ob) == true; const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; struct Gwn_Batch *geom; @@ -180,15 +181,6 @@ static void PAINT_VERTEX_engine_free(void) DRW_SHADER_FREE_SAFE(e_data.wire_overlay_shader); } -void PAINT_VERTEX_collection_settings_create(IDProperty *properties) -{ - BLI_assert(properties && - properties->type == IDP_GROUP && - properties->subtype == IDP_GROUP_SUB_MODE_PAINT_VERTEX); - - BKE_collection_engine_property_add_bool(properties, "use_wire", false); -} - static const DrawEngineDataSize PAINT_VERTEX_data_size = DRW_VIEWPORT_DATA_SIZE(PAINT_VERTEX_Data); DrawEngineType draw_engine_paint_vertex_type = { |