[Bf-blender-cvs] [614704f90c3] master: GPencil: Removing 'Only Show Selected' Requirement for DOPESHEET_HT_editor_buttons
Kevin C. Burke
noreply at git.blender.org
Sat Dec 31 16:26:57 CET 2022
Commit: 614704f90c32e7649d3d725495b9964af35e88e5
Author: Kevin C. Burke
Date: Sat Dec 31 16:26:27 2022 +0100
Branches: master
https://developer.blender.org/rB614704f90c32e7649d3d725495b9964af35e88e5
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
===================================================================
M release/scripts/startup/bl_ui/space_dopesheet.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index f95650ccc23..1913c809ec5 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -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
More information about the Bf-blender-cvs
mailing list