diff options
author | mano-wii <germano.costa@ig.com.br> | 2017-10-30 09:21:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-30 09:50:47 +0300 |
commit | 8277bee748188dbcab431e15bedd5c1b5559508a (patch) | |
tree | d886b3f123acfd1531ac18618c993ddb4733ab43 /source/blender/draw/modes/edit_mesh_mode.c | |
parent | 689ad9ade42fbb03084aaca7e478efddbe891e7f (diff) |
Draw Manager: re-enable edit-mesh text overlay
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 08310d75a57..1a8c03e3933 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -27,12 +27,16 @@ #include "DRW_render.h" #include "GPU_shader.h" + +#include "DNA_mesh_types.h" #include "DNA_view3d_types.h" #include "draw_common.h" #include "draw_mode_engines.h" +#include "edit_mesh_mode_intern.h" /* own include */ + extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */ extern struct GlobalsUboStorage ts; /* draw_common.c */ @@ -444,6 +448,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob) if (ob->type == OB_MESH) { if (ob == obedit) { + const Mesh *me = ob->data; IDProperty *ces_mode_ed = BKE_layer_collection_engine_evaluated_get(ob, COLLECTION_MODE_EDIT, ""); bool do_occlude_wire = BKE_collection_engine_property_value_get_bool(ces_mode_ed, "show_occlude_wire"); bool do_show_weight = BKE_collection_engine_property_value_get_bool(ces_mode_ed, "show_weight"); @@ -500,6 +505,16 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob) scene, ob, stl->g_data->face_overlay_shgrp, stl->g_data->ledges_overlay_shgrp, stl->g_data->lverts_overlay_shgrp, stl->g_data->facedot_overlay_shgrp, NULL); } + + /* 3D text overlay */ + if (me->drawflag & (ME_DRAWEXTRA_EDGELEN | + ME_DRAWEXTRA_FACEAREA | + ME_DRAWEXTRA_FACEANG | + ME_DRAWEXTRA_EDGEANG)) + { + DRW_edit_mesh_mode_text_measure_stats( + draw_ctx->ar, v3d, ob, &scene->unit); + } } } } |