diff options
author | Antonioya <blendergit@gmail.com> | 2018-11-26 20:12:39 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-11-26 20:12:39 +0300 |
commit | 99f7934e19ddf6796e866d2ddc0c3882ed8fcc2b (patch) | |
tree | 45e39dc690fd17f989bceac35e8ecf794417af34 /release/scripts | |
parent | c0816cd03b42399e75a285d5e5dd1319e5054f17 (diff) |
GP: New Blend Layers functionality
Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers.
Also a new Simplify option has been added to disable blend layers.
Diffstat (limited to 'release/scripts')
4 files changed, 26 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py index 949a48ed7f1..558c3c190b6 100644 --- a/release/scripts/startup/bl_ui/properties_data_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py @@ -135,13 +135,22 @@ class DATA_PT_gpencil_datapanel(Panel): col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index", rows=layer_rows, reverse=True) + gpl = context.active_gpencil_layer + 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, "clamp_layer", text="", + icon='MOD_MASK' if gpl.clamp_layer else 'ONIONSKIN_OFF') + col = row.column() sub = col.column(align=True) sub.operator("gpencil.layer_add", icon='ADD', text="") sub.operator("gpencil.layer_remove", icon='REMOVE', text="") - gpl = context.active_gpencil_layer if gpl: sub.menu("GPENCIL_MT_layer_specials", icon='DOWNARROW_HLT', text="") @@ -158,10 +167,6 @@ class DATA_PT_gpencil_datapanel(Panel): sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True - row = layout.row(align=True) - if gpl: - row.prop(gpl, "opacity", text="Opacity", slider=True) - class DATA_PT_gpencil_layer_optionpanel(LayerDataButtonsPanel, Panel): bl_space_type = 'PROPERTIES' 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 296e05a709d..b18254a9102 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -766,7 +766,6 @@ class AnnotationDataPanel: layout.prop(tool_settings, "annotation_thickness", text="Thickness") if gpl: - # layout.prop(gpl, "opacity", text="Opacity", slider=True) # Full-Row - Frame Locking (and Delete Frame) row = layout.row(align=True) row.active = not gpl.lock @@ -873,6 +872,10 @@ class GPENCIL_UL_layer(UIList): row.prop(gpl, "info", text="", emboss=False) row = layout.row(align=True) + row.prop(gpl, "clamp_layer", text="", + icon='MOD_MASK' if gpl.clamp_layer else 'ONIONSKIN_OFF', + emboss=False) + row.prop(gpl, "lock", text="", emboss=False) row.prop(gpl, "hide", text="", emboss=False) subrow = row.row(align=True) diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 026b306b49e..8cfbb09ad04 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -650,6 +650,7 @@ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel): def draw(self, context): layout = self.layout layout.use_property_split = True + layout.use_property_decorate = False rd = context.scene.render @@ -659,8 +660,8 @@ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel): col.prop(rd, "simplify_gpencil_onplay", text="Playback Only") col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers") col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX") + col.prop(rd, "simplify_gpencil_blend", text="Layers Blending") - col = layout.column(align=True) col.prop(rd, "simplify_gpencil_view_fill") sub = col.column() sub.active = rd.simplify_gpencil_view_fill diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 4fc2b12e950..a769268bb22 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -516,6 +516,16 @@ class TOPBAR_PT_gpencil_layers(Panel): col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index", rows=layer_rows, reverse=True) + gpl = context.active_gpencil_layer + 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, "clamp_layer", text="", + icon='MOD_MASK' if gpl.clamp_layer else 'ONIONSKIN_OFF') + col = row.column() sub = col.column(align=True) @@ -539,10 +549,6 @@ class TOPBAR_PT_gpencil_layers(Panel): sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False sub.operator("gpencil.layer_isolate", icon='HIDE_OFF', text="").affect_visibility = True - row = layout.row(align=True) - if gpl: - row.prop(gpl, "opacity", text="Opacity", slider=True) - class TOPBAR_MT_editor_menus(Menu): bl_idname = "TOPBAR_MT_editor_menus" |