[Bf-blender-cvs] [20c708d] master: GPencil UI: Make "Tint" settings take full width of panel in 2D editors

Joshua Leung noreply at git.blender.org
Mon Aug 29 04:52:45 CEST 2016


Commit: 20c708d4714799363d2ad0011db23e1c02cd4f43
Author: Joshua Leung
Date:   Mon Aug 29 01:36:13 2016 +1200
Branches: master
https://developer.blender.org/rB20c708d4714799363d2ad0011db23e1c02cd4f43

GPencil UI: Make "Tint" settings take full width of panel in 2D editors

Parenting options are not visible there (i.e. they're only for the 3D view),
so reserving space that isn't going to be used in those editors doesn't really
make much sense. Furthermore, those property regions are often quite narrow
too, so it doesn't help too much to keep these settings so narrow there.

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

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 677c7b9..65f1fdf 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -834,7 +834,10 @@ class GreasePencilDataPanel:
         split.prop(gpl, "show_points")
 
         # Offsets + Parenting (where available)
-        split = layout.split(percentage=0.5)
+        if context.space_data.type == 'VIEW_3D':
+            split = layout.split(percentage=0.5)
+        else:
+            split = layout.column()  # parenting is not available in 2D editors...
         split.active = not gpl.lock
 
         # Offsets - Color Tint




More information about the Bf-blender-cvs mailing list