[Bf-blender-cvs] [c830f213045] temp-T82134-anim-group-colors-to-prefs: Update Grease Pencil anim channel side panel to show a warning when channel colors are disabled.

Sybren A. Stüvel noreply at git.blender.org
Mon Nov 2 17:23:25 CET 2020


Commit: c830f213045ed81c28e60858d90adecf0ba03002
Author: Sybren A. Stüvel
Date:   Mon Nov 2 17:20:47 2020 +0100
Branches: temp-T82134-anim-group-colors-to-prefs
https://developer.blender.org/rBc830f213045ed81c28e60858d90adecf0ba03002

Update Grease Pencil anim channel side panel to show a warning when channel colors are disabled.

===================================================================

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py

===================================================================

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 d9dbb60b3b6..da7563b2d4b 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -880,13 +880,18 @@ class GreasePencilLayerDisplayPanel:
         gpd = ob.data
         gpl = gpd.layers.active
 
-        row = layout.row(align=True)
+        use_colors = context.preferences.edit.use_anim_channel_group_colors
+
+        col = layout.column(align=True)
+        col.active = use_colors
+        row = col.row(align=True)
         row.prop(gpl, "channel_color")
+        if not use_colors:
+            col.label(text="Channel Colors are disabled in Animation preferences")
 
         row = layout.row(align=True)
         row.prop(gpl, "use_solo_mode", text="Show Only on Keyframed")
 
-
 class GreasePencilFlipTintColors(Operator):
     bl_label = "Flip Colors"
     bl_idname = "gpencil.tint_flip"



More information about the Bf-blender-cvs mailing list