diff options
author | Matias Mendiola <matias.mendiola@gmail.com> | 2019-08-24 00:01:06 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-08-24 00:01:37 +0300 |
commit | d795dd1fa78036e7faa92891ee985c61508612c6 (patch) | |
tree | a31a6f9dd861d63899e748add38d929ca6584e92 | |
parent | f16a28c4afbfab86362898c19aa177227c9f47ed (diff) |
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
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_gpencil.py | 42 |
1 files changed, 23 insertions, 19 deletions
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" |