Workbench: respect the duplication visibility flag
This commit is contained in:
@@ -661,7 +661,6 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob)
|
||||
WORKBENCH_StorageList *stl = vedata->stl;
|
||||
WORKBENCH_PassList *psl = vedata->psl;
|
||||
WORKBENCH_PrivateData *wpd = stl->g_data;
|
||||
|
||||
if (!DRW_object_is_renderable(ob))
|
||||
return;
|
||||
|
||||
@@ -669,6 +668,10 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob)
|
||||
workbench_cache_populate_particles(vedata, ob);
|
||||
}
|
||||
|
||||
if (!DRW_check_object_visible_within_active_context(ob)) {
|
||||
return;
|
||||
}
|
||||
|
||||
WORKBENCH_MaterialData *material;
|
||||
if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT)) {
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
|
||||
@@ -517,6 +517,11 @@ void workbench_forward_cache_populate(WORKBENCH_Data *vedata, Object *ob)
|
||||
if (ob->type == OB_MESH) {
|
||||
workbench_forward_cache_populate_particles(vedata, ob);
|
||||
}
|
||||
|
||||
if (!DRW_check_object_visible_within_active_context(ob)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT)) {
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
const bool is_active = (ob == draw_ctx->obact);
|
||||
|
||||
Reference in New Issue
Block a user