DRW: support clipping for object outlines (unselected)
This commit is contained in:
parent
aa1b77dccb
commit
be32168eb4
Notes:
blender-bot
2023-02-14 08:08:56 +01:00
Referenced by issue #54688, Driving bone translate from bone scale is broken in 2.8
|
@ -753,7 +753,11 @@ static WORKBENCH_MaterialData *get_or_create_material_data(
|
|||
DRW_shgroup_stencil_mask(material->shgrp, (ob->dtx & OB_DRAWXRAY) ? 0x00 : 0xFF);
|
||||
DRW_shgroup_uniform_int(material->shgrp, "object_id", &material->object_id, 1);
|
||||
workbench_material_shgroup_uniform(wpd, material->shgrp, material, ob, true, true, interp);
|
||||
|
||||
if (wpd->world_clip_planes) {
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
RegionView3D *rv3d = draw_ctx->rv3d;
|
||||
DRW_shgroup_world_clip_planes_from_rv3d(material->shgrp, rv3d);
|
||||
}
|
||||
BLI_ghash_insert(wpd->material_hash, POINTER_FROM_UINT(hash), material);
|
||||
}
|
||||
return material;
|
||||
|
|
|
@ -202,6 +202,11 @@ static WORKBENCH_MaterialData *get_or_create_material_data(
|
|||
}
|
||||
material->object_id = engine_object_data->object_id;
|
||||
DRW_shgroup_uniform_int(material->shgrp_object_outline, "object_id", &material->object_id, 1);
|
||||
if (wpd->world_clip_planes) {
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
RegionView3D *rv3d = draw_ctx->rv3d;
|
||||
DRW_shgroup_world_clip_planes_from_rv3d(material->shgrp_object_outline, rv3d);
|
||||
}
|
||||
BLI_ghash_insert(wpd->material_hash, POINTER_FROM_UINT(hash), material);
|
||||
}
|
||||
return material;
|
||||
|
|
Loading…
Reference in New Issue