Page MenuHome

Animation: move group colors switch to user preferences
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Oct 30 2020, 11:01 AM.
Subscribers
None
Tokens
"Love" token, awarded by gilberto_rodrigues."Love" token, awarded by antoniov."Love" token, awarded by Robonnet."Love" token, awarded by Juangra_Membata."Love" token, awarded by looch.

Details

Summary

Move the "Show Group Colors" toggle from a per-editor option to a single user preference in the Animation preferences.

The old "Show Group Colors" toggle had to be set per editor, and was on by default. This meant that disabling group colors would require an action for every file, for every editor.

The Grease Pencil interface warns about this:

(the warning is not part of the below test builds though)

Test builds

Versioning Warning

Note that Blender's sub-version (a hidden number that's used for managing versioning code between various commits of a single release) hasn't been bumped yet in this commit. This means that the code that sets the default to ON of this new user preference is run every time Blender loads the user preferences. Expect the user preference to act like it wasn't saved -- it /is/ saved, it's just that the saved value is overwritten every time it's loaded. This will be resolved when the patch is committed, as only then I can reliably bump the sub-version.

Diff Detail

Repository
rB Blender
Branch
temp-T82134-anim-group-colors-to-prefs
Build Status
Buildable 11051
Build 11051: arc lint + arc unit

Event Timeline

Sybren A. Stüvel (sybren) requested review of this revision.Oct 30 2020, 11:01 AM
Sybren A. Stüvel (sybren) created this revision.

This is exactly it.
Excellent.

This revision is now accepted and ready to land.Oct 30 2020, 12:13 PM

Not tested, but I think we need this too:

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 97e87f5451c..9c30227701c 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -881,6 +881,7 @@ class GreasePencilLayerDisplayPanel:
         gpl = gpd.layers.active

         col = layout.row(align=True)
+        col.enabled = context.preferences.edit.use_anim_channel_group_colors
         col.prop(gpl, "channel_color")

         col = layout.row(align=True)
Sybren A. Stüvel (sybren) edited the summary of this revision. (Show Details)
  • Merge remote-tracking branch 'origin/master' into temp-T82134-anim-group-colors-to-prefs
  • Update Grease Pencil anim channel side panel to show a warning when channel colors are disabled.