Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-06-01 12:35:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-06-01 12:36:01 +0300
commit46830913696d2cd28a055df32adaf2791a4b4444 (patch)
treee19ea92db84be6c584eff3834cf89d2f2a3d22be /source/blender/draw/modes/object_mode.c
parentd5a359b1d434810e3c868db6931f460c49b17732 (diff)
Object Mode: Display loose edges if overlays are enables.
This fix T55280 Loose edges not visible in object mode
Diffstat (limited to 'source/blender/draw/modes/object_mode.c')
-rw-r--r--source/blender/draw/modes/object_mode.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index c6a90527f39..ff6fcdb83d2 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2101,28 +2101,26 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
{
if (ob != draw_ctx->object_edit) {
Mesh *me = ob->data;
- if (me->totpoly == 0) {
- if (me->totedge == 0) {
- struct Gwn_Batch *geom = DRW_cache_mesh_verts_get(ob);
- if (geom) {
- if (theme_id == TH_UNDEFINED) {
- theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL);
- }
-
- DRWShadingGroup *shgroup = shgroup_theme_id_to_point_or(stl, theme_id, stl->g_data->points);
- DRW_shgroup_call_object_add(shgroup, geom, ob);
+ if (me->totedge == 0) {
+ struct Gwn_Batch *geom = DRW_cache_mesh_verts_get(ob);
+ if (geom) {
+ if (theme_id == TH_UNDEFINED) {
+ theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL);
}
+
+ DRWShadingGroup *shgroup = shgroup_theme_id_to_point_or(stl, theme_id, stl->g_data->points);
+ DRW_shgroup_call_object_add(shgroup, geom, ob);
}
- else {
- struct Gwn_Batch *geom = DRW_cache_mesh_edges_get(ob);
- if (geom) {
- if (theme_id == TH_UNDEFINED) {
- theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL);
- }
-
- DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire);
- DRW_shgroup_call_object_add(shgroup, geom, ob);
+ }
+ else {
+ struct Gwn_Batch *geom = DRW_cache_mesh_loose_edges_get(ob);
+ if (geom) {
+ if (theme_id == TH_UNDEFINED) {
+ theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL);
}
+
+ DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire);
+ DRW_shgroup_call_object_add(shgroup, geom, ob);
}
}
}