Take xray_enabled into account for prepasses. Fix #132056 Fix #132057 Fix #132666
This commit is contained in:
@@ -290,7 +290,7 @@ class Meshes : Overlay {
|
||||
/* WORKAROUND: GPU subdiv uses a different normal format. Remove this once GPU subdiv is
|
||||
* refactored. */
|
||||
const bool use_gpu_subdiv = BKE_subsurf_modifier_has_gpu_subdiv(static_cast<Mesh *>(ob->data));
|
||||
const bool draw_as_solid = (ob->dt > OB_WIRE);
|
||||
const bool draw_as_solid = (ob->dt > OB_WIRE) && !state.xray_enabled;
|
||||
|
||||
if (show_retopology_) {
|
||||
gpu::Batch *geom = DRW_mesh_batch_cache_get_edit_triangles(mesh);
|
||||
|
||||
@@ -72,7 +72,7 @@ class Prepass : Overlay {
|
||||
public:
|
||||
void begin_sync(Resources &res, const State &state) final
|
||||
{
|
||||
enabled_ = state.is_space_v3d();
|
||||
enabled_ = state.is_space_v3d() && !state.xray_enabled;
|
||||
|
||||
if (!enabled_) {
|
||||
/* Not used. But release the data. */
|
||||
|
||||
Reference in New Issue
Block a user