GPencil: Removing 'Only Show Selected' Requirement for DOPESHEET_HT_editor_buttons

It's confusing for users when the Dopesheet's Editor Buttons for Grease Pencil are greyed out.
{F14099985}

[[ https://blenderartists.org/t/cant-create-new-layers-in-grease-pencil-dopesheet/1353882 | Can’t create new layers in grease pencil dopesheet ]]

This is often because the 'Only Show Selected' filter is disabled. This 'requirement' does not seem to be necessary since the Dopesheet is already in Grease Pencil mode and there is an active Grease Pencil Object. It is also not apparent as to why so many Operators depend on it and unintuitive that it controls their function. The 'Only Show Selected' filter button is far away from the Operator buttons in the User Interface Header, so it's difficult to make the association.

If the 'Only Show Selected' IS absolutely required, I believe it should be closer to the DOPESHEET_HT_editor_buttons. Otherwise, I think the requirement should be removed.

Reviewed By: antoniov

Differential Revision: https://developer.blender.org/D16885
This commit is contained in:
Kevin C. Burke 2022-12-31 16:26:27 +01:00 committed by Antonio Vazquez
parent 17d66fe79e
commit 614704f90c
Notes: blender-bot 2023-02-14 03:00:45 +01:00
Referenced by issue #103521, Blender crashes on open when using Metal GPU Backend
1 changed files with 1 additions and 2 deletions

View File

@ -238,8 +238,7 @@ class DOPESHEET_HT_editor_buttons:
# Layer management
if st.mode == 'GPENCIL':
ob = context.active_object
selected = st.dopesheet.show_only_selected
enable_but = selected and ob is not None and ob.type == 'GPENCIL'
enable_but = ob is not None and ob.type == 'GPENCIL'
row = layout.row(align=True)
row.enabled = enable_but