[Bf-blender-cvs] [01a1b977dc0] greasepencil-object: GP: Reorganize Mask icons

Antonioya noreply at git.blender.org
Sat Nov 24 12:25:48 CET 2018


Commit: 01a1b977dc0a781c6330665ee52a57f384a77c3d
Author: Antonioya
Date:   Sat Nov 24 12:25:40 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB01a1b977dc0a781c6330665ee52a57f384a77c3d

GP: Reorganize Mask icons

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index bf457a44f84..d99c3ca2f80 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -161,7 +161,9 @@ class DATA_PT_gpencil_datapanel(Panel):
         if gpl:
             row = layout.row(align=True)
             row.prop(gpl, "blend_mode", text="Blend")
-            row.prop(gpl, "use_mask", text="", icon='MOD_MASK')
+            subrow = row.row(align=True)
+            subrow.enabled = gpl.blend_mode != 'NORMAL'
+            subrow.prop(gpl, "use_mask", text="", icon='MOD_MASK')
             row = layout.row(align=True)
             row.enabled = gpl.blend_mode == 'NORMAL'
             row.prop(gpl, "opacity", text="Opacity", slider=True)
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 14f59d0b369..18f408e9b3a 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -865,6 +865,10 @@ class GPENCIL_UL_layer(UIList):
                 layout.active = False
 
             row = layout.row(align=True)
+            row.label(
+                text="",
+                icon='MOD_MASK' if gpl.use_mask else 'BLANK1'
+            )
             row.label(
                 text="",
                 icon='BONE_DATA' if gpl.is_parented else 'BLANK1',
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index ca0702e717f..1847dc70765 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -542,7 +542,9 @@ class TOPBAR_PT_gpencil_layers(Panel):
         if gpl:
             row = layout.row(align=True)
             row.prop(gpl, "blend_mode", text="Blend")
-            row.prop(gpl, "use_mask", text="", icon='MOD_MASK')
+            subrow = row.row(align=True)
+            subrow.enabled = gpl.blend_mode != 'NORMAL'
+            subrow.prop(gpl, "use_mask", text="", icon='MOD_MASK')
             row = layout.row(align=True)
             row.enabled = gpl.blend_mode == 'NORMAL'
             row.prop(gpl, "opacity", text="Opacity", slider=True)



More information about the Bf-blender-cvs mailing list