UI: Grey out 'Show Object Origins' option in paint modes
The overlay is not shown in any of these modes, grey out the option to better indicate to users that it is expected to have no effect. Part of #93501 Pull Request: https://projects.blender.org/blender/blender/pulls/146876
This commit is contained in:
@@ -7036,6 +7036,7 @@ class VIEW3D_PT_overlay_object(Panel):
|
||||
view = context.space_data
|
||||
overlay = view.overlay
|
||||
display_all = overlay.show_overlays
|
||||
mode = context.mode
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.active = display_all
|
||||
@@ -7053,9 +7054,23 @@ class VIEW3D_PT_overlay_object(Panel):
|
||||
sub = split.column(align=True)
|
||||
sub.prop(overlay, "show_bones", text="Bones")
|
||||
sub.prop(overlay, "show_motion_paths")
|
||||
sub.prop(overlay, "show_object_origins", text="Origins")
|
||||
|
||||
can_show_object_origins = False if mode in {
|
||||
'PAINT_TEXTURE',
|
||||
'PAINT_2D',
|
||||
'SCULPT',
|
||||
'PAINT_VERTEX',
|
||||
'PAINT_WEIGHT',
|
||||
'SCULPT_CURVES',
|
||||
'PAINT_GREASE_PENCIL',
|
||||
'VERTEX_GREASE_PENCIL',
|
||||
'WEIGHT_GREASE_PENCIL',
|
||||
'SCULPT_GREASE_PENCIL'} else True
|
||||
subsub = sub.column()
|
||||
subsub.active = overlay.show_object_origins
|
||||
subsub.active = can_show_object_origins
|
||||
subsub.prop(overlay, "show_object_origins", text="Origins")
|
||||
subsub = sub.column()
|
||||
subsub.active = can_show_object_origins and overlay.show_object_origins
|
||||
subsub.prop(overlay, "show_object_origins_all", text="Origins (All)")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user