[Bf-blender-cvs] [936a2c6] master: GPencil UI: Move the "quick toggles" for colors into their own row below the list

Joshua Leung noreply at git.blender.org
Mon Aug 29 07:12:52 CEST 2016


Commit: 936a2c6459717a35274109796b03becfaa597fc3
Author: Joshua Leung
Date:   Mon Aug 29 17:10:53 2016 +1200
Branches: master
https://developer.blender.org/rB936a2c6459717a35274109796b03becfaa597fc3

GPencil UI: Move the "quick toggles" for colors into their own row below the list

Previously, they were in a column alongside the list, but because the lists were
rarely that long, there would always be a large gap left below the list.

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

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 ba7006d..aa449d5 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -969,10 +969,13 @@ class GreasePencilPaletteColorPanel:
                 sub.operator("gpencil.palettecolor_move", icon='TRIA_UP', text="").direction = 'UP'
                 sub.operator("gpencil.palettecolor_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
 
-                col.separator()
-                sub = col.column(align=True)
+                row = layout.row()
+                sub = row.row(align=True)
+                sub.label(text="Isolate:") # based on active color only
                 sub.operator("gpencil.palettecolor_isolate", icon='LOCKED', text="").affect_visibility = False
                 sub.operator("gpencil.palettecolor_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True
+                sub = row.row(align=True)
+                sub.label(text="Lock:") # based on other stuff...
                 sub.operator("gpencil.stroke_lock_color", icon='BORDER_RECT', text="")
                 sub.operator("gpencil.palette_lock_layer", icon='COLOR', text="")
 
@@ -980,9 +983,7 @@ class GreasePencilPaletteColorPanel:
             if pcolor:
                 self.draw_palettecolors(layout, pcolor)
 
-    # ----------------------------------------------
     # Draw palette colors
-    # ----------------------------------------------
     def draw_palettecolors(self, layout, pcolor):
         # color settings
         split = layout.split(percentage=0.5)
@@ -1015,6 +1016,7 @@ class GreasePencilPaletteColorPanel:
 
 
 class GreasePencilToolsPanel:
+    # For use in "2D" Editors without their own toolbar
     # subclass must set
     # bl_space_type = 'IMAGE_EDITOR'
     # bl_options = {'DEFAULT_CLOSED'}




More information about the Bf-blender-cvs mailing list