[Bf-blender-cvs] [3884d766451] greasepencil-object: Adjust Blend mode y Opacity to column

Antonioya noreply at git.blender.org
Sun Nov 25 16:12:25 CET 2018


Commit: 3884d7664512ce5123bb3687f8cea2f8ab6c8fff
Author: Antonioya
Date:   Sun Nov 25 16:12:14 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB3884d7664512ce5123bb3687f8cea2f8ab6c8fff

Adjust Blend mode y Opacity to column

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

M	release/scripts/startup/bl_ui/properties_data_gpencil.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 4a058a743b8..d6da5648ab5 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -135,13 +135,24 @@ class DATA_PT_gpencil_datapanel(Panel):
         col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index",
                           rows=layer_rows, reverse=True)
 
+        gpl = context.active_gpencil_layer
+        if gpl:
+            srow = col.row(align=True)
+            srow.prop(gpl, "blend_mode", text="Blend")
+            subrow = srow.row(align=True)
+            subrow.enabled = gpl.blend_mode != 'NORMAL'
+            subrow.prop(gpl, "disable_mask", text="", icon='MOD_MASK')
+
+            srow = col.row(align=True)
+            srow.enabled = gpl.blend_mode == 'NORMAL'
+            srow.prop(gpl, "opacity", text="Opacity", slider=True)
+
         col = row.column()
 
         sub = col.column(align=True)
         sub.operator("gpencil.layer_add", icon='ADD', text="")
         sub.operator("gpencil.layer_remove", icon='REMOVE', text="")
 
-        gpl = context.active_gpencil_layer
         if gpl:
             sub.menu("GPENCIL_MT_layer_specials", icon='DOWNARROW_HLT', text="")
 
@@ -158,16 +169,6 @@ class DATA_PT_gpencil_datapanel(Panel):
                 sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
                 sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True
 
-        if gpl:
-            row = layout.row(align=True)
-            row.prop(gpl, "blend_mode", text="Blend")
-            subrow = row.row(align=True)
-            subrow.enabled = gpl.blend_mode != 'NORMAL'
-            subrow.prop(gpl, "disable_mask", text="", icon='MOD_MASK')
-            row = layout.row(align=True)
-            row.enabled = gpl.blend_mode == 'NORMAL'
-            row.prop(gpl, "opacity", text="Opacity", slider=True)
-
 
 class DATA_PT_gpencil_layer_optionpanel(LayerDataButtonsPanel, Panel):
     bl_space_type = 'PROPERTIES'
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 728b7edba92..e28fdb81c31 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -516,6 +516,18 @@ class TOPBAR_PT_gpencil_layers(Panel):
         col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index",
                           rows=layer_rows, reverse=True)
 
+        gpl = context.active_gpencil_layer
+        if gpl:
+            srow = col.row(align=True)
+            srow.prop(gpl, "blend_mode", text="Blend")
+            subrow = srow.row(align=True)
+            subrow.enabled = gpl.blend_mode != 'NORMAL'
+            subrow.prop(gpl, "disable_mask", text="", icon='MOD_MASK')
+
+            srow = col.row(align=True)
+            srow.enabled = gpl.blend_mode == 'NORMAL'
+            srow.prop(gpl, "opacity", text="Opacity", slider=True)
+
         col = row.column()
 
         sub = col.column(align=True)
@@ -539,16 +551,6 @@ class TOPBAR_PT_gpencil_layers(Panel):
                 sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
                 sub.operator("gpencil.layer_isolate", icon='HIDE_OFF', text="").affect_visibility = True
 
-        if gpl:
-            row = layout.row(align=True)
-            row.prop(gpl, "blend_mode", text="Blend")
-            subrow = row.row(align=True)
-            subrow.enabled = gpl.blend_mode != 'NORMAL'
-            subrow.prop(gpl, "disable_mask", text="", icon='MOD_MASK')
-            row = layout.row(align=True)
-            row.enabled = gpl.blend_mode == 'NORMAL'
-            row.prop(gpl, "opacity", text="Opacity", slider=True)
-
 
 class TOPBAR_MT_editor_menus(Menu):
     bl_idname = "TOPBAR_MT_editor_menus"



More information about the Bf-blender-cvs mailing list