Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Reynish <billreynish>2021-01-25 15:39:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-25 15:41:00 +0300
commitda2955fdf66d9c232e3121be5713bcbd7a6c2ae1 (patch)
tree6baf5b449f5191cb79871c0fcb2f90b06dbd9721 /release/scripts/startup/bl_ui/properties_grease_pencil_common.py
parent06fdbe666424e2ff03dc2953857989f9ba496420 (diff)
UI: improve categorization in Grease Pencil Layers sub-panels
The "Layers" panel for Grease Pencil objects uses sub-panels to organize their properties in categories. Currently, this isn't so clear. This patch cleans up these sub-panels with clearer categorization. Reviewed By: #grease_pencil, antoniov, Blendify, HooglyBoogly Ref D10184
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_grease_pencil_common.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py50
1 files changed, 30 insertions, 20 deletions
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 fecc09da539..67905192fe8 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -727,12 +727,32 @@ class GreasePencilSimplifyPanel:
col.prop(rd, "simplify_gpencil_antialiasing")
+class GreasePencilLayerTransformPanel:
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ ob = context.object
+ gpd = ob.data
+ gpl = gpd.layers.active
+ layout.active = not gpl.lock
+
+ row = layout.row(align=True)
+ row.prop(gpl, "location")
+
+ row = layout.row(align=True)
+ row.prop(gpl, "rotation")
+
+ row = layout.row(align=True)
+ row.prop(gpl, "scale")
+
+
class GreasePencilLayerAdjustmentsPanel:
def draw(self, context):
layout = self.layout
layout.use_property_split = True
- scene = context.scene
ob = context.object
gpd = ob.data
@@ -750,25 +770,6 @@ class GreasePencilLayerAdjustmentsPanel:
col = layout.row(align=True)
col.prop(gpl, "line_change", text="Stroke Thickness")
- col = layout.row(align=True)
- col.prop(gpl, "pass_index")
-
- col = layout.row(align=True)
- col.prop_search(gpl, "viewlayer_render", scene, "view_layers", text="View Layer")
-
- col = layout.row(align=True)
- col.prop(gpl, "lock_material")
-
- # Transforms
- row = layout.row(align=True)
- row.prop(gpl, "location")
-
- row = layout.row(align=True)
- row.prop(gpl, "rotation")
-
- row = layout.row(align=True)
- row.prop(gpl, "scale")
-
class GPENCIL_UL_masks(UIList):
def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
@@ -836,6 +837,7 @@ class GreasePencilLayerRelationsPanel:
layout.use_property_split = True
layout.use_property_decorate = False
+ scene = context.scene
ob = context.object
gpd = ob.data
gpl = gpd.layers.active
@@ -849,6 +851,14 @@ class GreasePencilLayerRelationsPanel:
if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE':
col.prop_search(gpl, "parent_bone", parent.data, "bones", text="Bone")
+ layout.separator()
+
+ col = layout.row(align=True)
+ col.prop(gpl, "pass_index")
+
+ col = layout.row(align=True)
+ col.prop_search(gpl, "viewlayer_render", scene, "view_layers", text="View Layer")
+
class GreasePencilLayerDisplayPanel: