Page MenuHome

Fix T83398: Fade inactive geometry overlay option not visible depending on the mode
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Jan 26 2021, 6:52 PM.

Details

Summary

This option should always be available. Even if it does not affect the
current object depending on its mode, it affects the rest of the geometry
of the scene.

The rest of the options also work this way. For example, a grease pencil
object does not have face orientation, but the ovelay option is still
there for the rest of the scene.

Diff Detail

Repository
rB Blender
Branch
T83398 (branched from master)
Build Status
Buildable 12771
Build 12771: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Jan 26 2021, 6:52 PM
Pablo Dobarro (pablodp606) created this revision.

This basically reverts rBb7ca2365cfc3: UI: Hide fade inactive geometry overlay settings for unsupported modes -- which was done to prevent expectations that this setting would affect the particular mode's drawing.
But for the case presented in T83398, I agree it makes sense to have the setting visible.

Would it make sense though to have the row active depending on the mode (to indicate this does not affect mode's drawing)?
This way it can still be tweaked.

1
2
3diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
4index e653ead21bb..a53b22d6af2 100644
5--- a/release/scripts/startup/bl_ui/space_view3d.py
6+++ b/release/scripts/startup/bl_ui/space_view3d.py
7@@ -6171,14 +6171,14 @@ class VIEW3D_PT_overlay_geometry(Panel):
8 sub.prop(overlay, "wireframe_opacity", text="Opacity")
9
10 row = col.row(align=True)
11- if context.mode not in {
12+ row.active = context.mode not in {
13 'EDIT_ARMATURE', 'POSE', 'OBJECT',
14 'PAINT_GPENCIL', 'VERTEX_GPENCIL', 'WEIGHT_GPENCIL', 'SCULPT_GPENCIL', 'EDIT_GPENCIL',
15- }:
16- row.prop(overlay, "show_fade_inactive", text="")
17- sub = row.row()
18- sub.active = overlay.show_fade_inactive
19- sub.prop(overlay, "fade_inactive_alpha", text="Fade Inactive Geometry")
20+ }
21+ row.prop(overlay, "show_fade_inactive", text="")
22+ sub = row.row()
23+ sub.active = overlay.show_fade_inactive
24+ sub.prop(overlay, "fade_inactive_alpha", text="Fade Inactive Geometry")
25
26 col = layout.column(align=True)
27 col.active = display_all

I think it does not make sense to have the row inactive when it is affecting the rest of the scene, even if it does not affect the current object.
We can maybe consider hiding the row in object mode, which is the only mode where the overlay won't do anything regardless of the scene content.

Hans Goudey (HooglyBoogly) requested changes to this revision.EditedJan 29 2021, 7:38 PM

Generally only the settings relative to the current mode are displayed.

The settings for edit mode overlays are not displayed in object mode, same for sculpt mode overlays, etc. It's a context sensitive popover.
So I don't think it makes sense to display this setting in object mode where it has no effect.

This revision now requires changes to proceed.Jan 29 2021, 7:38 PM
  • Hide fade inactive options only in object mode

Makes sense now, thanks.

This revision is now accepted and ready to land.Feb 24 2021, 5:22 PM

Could this be committed to master.
what is holding it ?

dupoxy (dupoxy) added a comment.EditedMar 13 2021, 5:33 PM

Gentle ping.

@Julien Kaspar (JulienKaspar) can you accept this ?
@Dalai Felinto (dfelinto) can this go in master please ?

This patch has an approved status yet it was not committed yet. So I'm assuming the other reviewers are blocking. Updating the reviewers list to reflect that. This way the patch show as pending still.

This revision now requires review to proceed.Mar 26 2021, 5:25 PM

@Julien Kaspar (JulienKaspar) can you accept this?
If not, ask someone else so this can move forward.

This revision is now accepted and ready to land.Apr 17 2021, 11:50 AM

For what's worth this is really needed IMO. It affects rigging too (armature edit mode)