diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-07-05 16:39:20 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-07-05 17:57:22 +0300 |
commit | 404bacc63980e33957c1ee98f2bd758dac90e951 (patch) | |
tree | 8b465bb68e6fff2af22ba9319611ff3f81bcb2d8 /source/blender/draw/modes | |
parent | 35f8198c9de254ff0ef2595719275413f1b798a5 (diff) |
Refactored into a single option
Technical all options are still there for finetuning.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index b8387a53f22..0a45dd7f123 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -2185,27 +2185,31 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) break; case OB_LATTICE: { - if (ob != draw_ctx->object_edit) { - struct Gwn_Batch *geom = DRW_cache_lattice_wire_get(ob, false); - if (theme_id == TH_UNDEFINED) { - theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL); - } + if ((v3d->overlay.hidden_object_types & V3D_OVERLAY_HIDE_OTHER) == 0) { + if (ob != draw_ctx->object_edit) { + struct Gwn_Batch *geom = DRW_cache_lattice_wire_get(ob, false); + 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); + DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire); + DRW_shgroup_call_object_add(shgroup, geom, ob); + } } break; } case OB_CURVE: { - if (ob != draw_ctx->object_edit) { - struct Gwn_Batch *geom = DRW_cache_curve_edge_wire_get(ob); - if (theme_id == TH_UNDEFINED) { - theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL); + if ((v3d->overlay.hidden_object_types & V3D_OVERLAY_HIDE_OTHER) == 0) { + if (ob != draw_ctx->object_edit) { + struct Gwn_Batch *geom = DRW_cache_curve_edge_wire_get(ob); + 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); } - DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire); - DRW_shgroup_call_object_add(shgroup, geom, ob); } break; } @@ -2271,8 +2275,10 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) break; } - if (ob->pd && ob->pd->forcefield) { - DRW_shgroup_forcefield(stl, ob, view_layer); + if ((v3d->overlay.hidden_object_types & V3D_OVERLAY_HIDE_OTHER) == 0) { + if (ob->pd && ob->pd->forcefield) { + DRW_shgroup_forcefield(stl, ob, view_layer); + } } /* don't show object extras in set's */ |