[Bf-blender-cvs] [773f9f19d89] greasepencil-object: UI: Disable Onion filter at Layer level

Antonioya noreply at git.blender.org
Sat Sep 16 19:39:18 CEST 2017


Commit: 773f9f19d899e87587f782351efb242f7b8eea2a
Author: Antonioya
Date:   Sat Sep 16 19:39:03 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB773f9f19d899e87587f782351efb242f7b8eea2a

UI: Disable Onion filter at Layer level

If main switch is disabled, thios column must be disabled too.

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

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 6751d96cc9a..56e668ebdb3 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -928,6 +928,7 @@ class GPENCIL_UL_layer(UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
         # assert(isinstance(item, bpy.types.GPencilLayer)
         gpl = item
+        gpd = context.gpencil_data
 
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
             if gpl.lock:
@@ -950,7 +951,9 @@ class GPENCIL_UL_layer(UIList):
                 icon = 'GHOST_DISABLED'
             else:
                 icon = 'GHOST_ENABLED'
-            row.prop(gpl, "use_onion_skinning", text="", icon=icon, emboss=False)
+            subrow = row.row(align=True)
+            subrow.prop(gpl, "use_onion_skinning", text="", icon=icon, emboss=False)
+            subrow.active = gpd.use_onion_skinning
         elif self.layout_type == 'GRID':
             layout.alignment = 'CENTER'
             layout.label(text="", icon_value=icon)



More information about the Bf-blender-cvs mailing list