[Bf-blender-cvs] [18d354a5eb4] blender2.8: GP: Remove Object Onion Skin switch

Antonioya noreply at git.blender.org
Mon Dec 10 20:29:57 CET 2018


Commit: 18d354a5eb4be975c11cedfab4b17f3ef6fd33ff
Author: Antonioya
Date:   Mon Dec 10 16:42:40 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB18d354a5eb4be975c11cedfab4b17f3ef6fd33ff

GP: Remove Object Onion Skin switch

It was confusing to have two switches.

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

M	release/scripts/startup/bl_ui/properties_data_gpencil.py
M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	source/blender/draw/engines/gpencil/gpencil_draw_utils.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index 5a64389e5c6..56612c3aa1b 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -240,18 +240,14 @@ class DATA_PT_gpencil_onionpanel(Panel):
     def poll(cls, context):
         return bool(context.active_gpencil_layer)
 
-    @staticmethod
-    def draw_header(self, context):
-        self.layout.prop(context.gpencil_data, "use_onion_skinning", text="")
-
     def draw(self, context):
         gpd = context.gpencil_data
 
         layout = self.layout
         layout.use_property_split = True
-        layout.enabled = gpd.use_onion_skinning and gpd.users <= 1
+        layout.enabled = gpd.users <= 1
 
-        if gpd.use_onion_skinning and gpd.users > 1:
+        if gpd.users > 1:
             layout.label(text="Multiuser datablock not supported", icon='ERROR')
 
         GreasePencilOnionPanel.draw_settings(layout, gpd)
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 1bedc2c4f97..fff4a063ef8 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -855,7 +855,6 @@ class GreasePencilOnionPanel:
         layout.prop(gp, "use_ghosts_always", text="View In Render")
 
         col = layout.column(align=True)
-        col.active = gp.use_onion_skinning
         col.prop(gp, "use_onion_fade", text="Fade")
         if hasattr(gp, "use_onion_loop"):  # XXX
             sub = layout.column()
@@ -995,7 +994,6 @@ class GPENCIL_UL_layer(UIList):
                 icon='ONIONSKIN_ON' if gpl.use_onion_skinning else 'ONIONSKIN_OFF',
                 emboss=False,
             )
-            subrow.active = gpd.use_onion_skinning
         elif self.layout_type == 'GRID':
             layout.alignment = 'CENTER'
             layout.label(
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index a0e9d124e6b..fe950d2a228 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -369,9 +369,6 @@ static DRWShadingGroup *DRW_gpencil_shgroup_fill_create(
 /* check if some onion is enabled */
 bool DRW_gpencil_onion_active(bGPdata *gpd)
 {
-	if ((gpd->flag & GP_DATA_SHOW_ONIONSKINS) == 0) {
-		return false;
-	}
 	for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
 		if (gpl->onion_flag & GP_LAYER_ONIONSKIN) {
 			return true;



More information about the Bf-blender-cvs mailing list