[Bf-blender-cvs] [d795dd1fa78] master: GPencil: Object data UI updates
Matias Mendiola
noreply at git.blender.org
Fri Aug 23 23:02:14 CEST 2019
Commit: d795dd1fa78036e7faa92891ee985c61508612c6
Author: Matias Mendiola
Date: Fri Aug 23 23:01:06 2019 +0200
Branches: master
https://developer.blender.org/rBd795dd1fa78036e7faa92891ee985c61508612c6
GPencil: Object data UI updates
Some tweaks for the Grease Pencil object data UI:
- Update main layers controls for consistency (Opacity, Blend mode).
- Move "Show only On Keyframed" checkbox to Display section.
- Change "Duplicate Layer" icon in Layer menu.
{F7695928}
Reviewers: antoniov, pepeland, billreynish
Reviewed By: billreynish
Tags: #bf_blender, #grease_pencil
Differential Revision: https://developer.blender.org/D5571
===================================================================
M release/scripts/startup/bl_ui/properties_data_gpencil.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index 7d3c61af34c..608d192f423 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -84,7 +84,7 @@ class GPENCIL_MT_layer_context_menu(Menu):
ob = context.object
gpd = ob.data
- layout.operator("gpencil.layer_duplicate", icon='ADD') # XXX: needs a dedicated icon
+ layout.operator("gpencil.layer_duplicate", icon='DUPLICATE')
layout.separator()
@@ -123,29 +123,16 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
def draw_layers(self, _context, layout, gpd):
- row = layout.row()
+ gpl = gpd.layers.active
- col = row.column()
+ row = layout.row()
layer_rows = 7
+
+ col = row.column()
col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index",
rows=layer_rows, sort_reverse=True, sort_lock=True)
- gpl = gpd.layers.active
-
- if gpl:
- srow = col.row(align=True)
- srow.prop(gpl, "blend_mode", text="Blend")
-
- srow = col.row(align=True)
- srow.prop(gpl, "opacity", text="Opacity", slider=True)
- srow.prop(gpl, "mask_layer", text="",
- icon='MOD_MASK' if gpl.mask_layer else 'LAYER_ACTIVE')
-
- srow = col.row(align=True)
- srow.prop(gpl, "use_solo_mode", text="Show Only On Keyframed")
-
col = row.column()
-
sub = col.column(align=True)
sub.operator("gpencil.layer_add", icon='ADD', text="")
sub.operator("gpencil.layer_remove", icon='REMOVE', text="")
@@ -165,7 +152,23 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
sub = col.column(align=True)
sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True
+
+ # Layer main properties
+ row = layout.row()
+ col = layout.column(align=True)
+ if gpl:
+
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = True
+ col = layout.column(align=True)
+
+ col = layout.row(align=True)
+ col.prop(gpl, "blend_mode", text="Blend")
+
+ col = layout.row(align=True)
+ col.prop(gpl, "opacity", text="Opacity", slider=True)
class DATA_PT_gpencil_layer_adjustments(LayerDataButtonsPanel, Panel):
bl_label = "Adjustments"
@@ -201,7 +204,6 @@ class DATA_PT_gpencil_layer_adjustments(LayerDataButtonsPanel, Panel):
col = layout.row(align=True)
col.prop(gpl, "lock_material")
-
class DATA_PT_gpencil_layer_relations(LayerDataButtonsPanel, Panel):
bl_label = "Relations"
bl_parent_id = 'DATA_PT_gpencil_layers'
@@ -241,6 +243,8 @@ class DATA_PT_gpencil_layer_display(LayerDataButtonsPanel, Panel):
col = layout.row(align=True)
col.prop(gpl, "channel_color")
+ col = layout.row(align=True)
+ col.prop(gpl, "use_solo_mode", text="Show Only On Keyframed")
class DATA_PT_gpencil_onion_skinning(DataButtonsPanel, Panel):
bl_label = "Onion Skinning"
More information about the Bf-blender-cvs
mailing list