Fix #118116: Only hide solid mesh if overlays are enabled

When the retopology overlay is enabled, the edit mesh is not drawn
in solid mode. When you disabled overlays however, it would not be
drawn in any mode, which understandably confused users.
Now it checks whether overlays are enabled before it hides the solid mesh.

Pull Request: https://projects.blender.org/blender/blender/pulls/118422
This commit is contained in:
bonj
2024-02-20 12:57:24 +01:00
committed by Pratik Borhade
parent 8437e49da1
commit f5151bbbeb

View File

@@ -188,7 +188,7 @@ bool DRW_object_is_renderable(const Object *ob)
if (ob->type == OB_MESH) {
if ((ob == DST.draw_ctx.object_edit) || DRW_object_is_in_edit_mode(ob)) {
View3D *v3d = DST.draw_ctx.v3d;
if (v3d && RETOPOLOGY_ENABLED(v3d)) {
if (v3d && ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) && RETOPOLOGY_ENABLED(v3d)) {
return false;
}
}