[Bf-blender-cvs] [8adcd93] master: GPencil: Tweaks to layout to try and get the spacing a bit nicer

Joshua Leung noreply at git.blender.org
Fri Aug 5 17:50:17 CEST 2016


Commit: 8adcd93769800afb0deb989c6e077e5994478fb6
Author: Joshua Leung
Date:   Sat Aug 6 03:46:42 2016 +1200
Branches: master
https://developer.blender.org/rB8adcd93769800afb0deb989c6e077e5994478fb6

GPencil: Tweaks to layout to try and get the spacing a bit nicer

Currently, the lack of spacing (or rather, odd spacing/clumping) in places
seemed a bit off.

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

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 1ad1536..c80c5ca 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -821,33 +821,32 @@ class GreasePencilDataPanel:
     def draw_layer(self, context, layout, gpl):
         row = layout.row(align=True)
         row.prop(gpl, "opacity", text="Opacity", slider=True)
-        # layer settings
+
+        # Layer options
         split = layout.split(percentage=0.5)
         split.active = not gpl.lock
-        # Options
+        split.prop(gpl, "show_x_ray")
+        split.prop(gpl, "show_points")
+
+        # Offsets + Parenting (where available)
         split = layout.split(percentage=0.5)
-        col = split.column(align=True)
-        col.active = not gpl.lock
-        col.prop(gpl, "show_x_ray")
+        split.active = not gpl.lock
 
-        col.label("Tint")
-        col.prop(gpl, "tint_color", text="")
-        col.prop(gpl, "tint_factor", text="Factor", slider=True)
+        # Offsets - Color Tint
+        col = split.column()
+        subcol = col.column(align=True)
+        subcol.label("Tint")
+        subcol.prop(gpl, "tint_color", text="")
+        subcol.prop(gpl, "tint_factor", text="Factor", slider=True)
 
-        col = split.column(align=True)
-        col.active = not gpl.lock
-        col.prop(gpl, "show_points", text="Points")
-        # Full-Row - Parent
-        '''
-        row = layout.row()
-        if context.area.type == 'VIEW_3D' and not gpl.lock:
-            row.enabled = True
-        else:
-            row.enabled = False
-        '''
+        # Offsets - Thickness
+        row = col.row(align=True)
+        row.prop(gpl, "line_change", text="Thickness Change", slider=True)
+        row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="")
 
-        # col = row.column()
+        # Parenting 
         if context.space_data.type == 'VIEW_3D':
+            col = split.column(align=True)
             col.label(text="Parent:")
             col.prop(gpl, "parent", text="")
 
@@ -857,11 +856,7 @@ class GreasePencilDataPanel:
             if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE':
                 sub.prop_search(gpl, "parent_bone", parent.data, "bones", text="")
 
-        # Full-Row - Thickness
-        row = layout.row(align=True)
-        row.active = not gpl.lock
-        row.prop(gpl, "line_change", text="Thickness change", slider=True)
-        row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="")
+        layout.separator()
 
         # Full-Row - Frame Locking (and Delete Frame)
         row = layout.row(align=True)
@@ -875,6 +870,8 @@ class GreasePencilDataPanel:
         row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED')
         row.operator("gpencil.active_frame_delete", text="", icon='X')
 
+        layout.separator()
+
         # Onion skinning
         col = layout.column(align=True)
         col.active = not gpl.lock




More information about the Bf-blender-cvs mailing list