diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-31 19:26:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-31 19:26:24 +0300 |
commit | 390648b98473851c5cdff88aca5ba72aa57151e4 (patch) | |
tree | 28d61ebd8433e3e82ffd63257a973384c7edc353 /source/blender/draw | |
parent | 72cc6bea14b83ee32f0593be7457cc32188a75e8 (diff) |
DwM: Show wire only mesh objects
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 1 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 70135389a8d..7c530e53ac1 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -2422,7 +2422,6 @@ static ElementList *mesh_batch_cache_get_edges_in_order(MeshRenderData *rdata, M BLI_assert(rdata->types & (MR_DATATYPE_VERT | MR_DATATYPE_EDGE)); if (cache->edges_in_order == NULL) { - printf("Caching edges in order...\n"); const int vert_len = mesh_render_data_verts_len_get(rdata); const int edge_len = mesh_render_data_edges_len_get(rdata); diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 205a0c16613..8abe59b1cbf 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -30,6 +30,7 @@ #include "DNA_armature_types.h" #include "DNA_camera_types.h" #include "DNA_curve_types.h" +#include "DNA_mesh_types.h" #include "DNA_object_force.h" #include "DNA_particle_types.h" #include "DNA_view3d_types.h" @@ -1526,8 +1527,26 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) switch (ob->type) { case OB_MESH: + { + Mesh *me = ob->data; + if (me->totpoly == 0) { + Object *obedit = scene->obedit; + if (ob != obedit) { + struct Batch *geom = DRW_cache_mesh_edges_get(ob); + if (geom) { + if (theme_id == TH_UNDEFINED) { + theme_id = DRW_object_wire_theme_get(ob, sl, NULL); + } + + DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire); + DRW_shgroup_call_add(shgroup, geom, ob->obmat); + } + } + } + OBJECT_cache_populate_particles(ob, psl); break; + } case OB_SURF: break; case OB_LATTICE: |