From 4dce18fb51f17269161d1c2a16571502b97a860b Mon Sep 17 00:00:00 2001 From: Antonioya Date: Thu, 18 Apr 2019 14:19:00 +0200 Subject: GPencil: Add option to mix color with texture This was already supported in Fill, but not in Strokes. This adds more artistic options when use textured strokes. --- .../scripts/startup/bl_ui/properties_material_gpencil.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_material_gpencil.py') diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index e982bea9438..51ad691f1d7 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -146,8 +146,14 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel): col.prop(gpcolor, "pixel_size", text="UV Factor") col.prop(gpcolor, "use_stroke_pattern", text="Use As Pattern") - - if gpcolor.stroke_style == 'SOLID' or gpcolor.use_stroke_pattern is True: + if gpcolor.use_stroke_pattern is False: + col.prop(gpcolor, "use_stroke_texture_mix", text="Mix Color") + if gpcolor.use_stroke_texture_mix is True: + col.prop(gpcolor, "mix_stroke_factor", text="Factor") + + if gpcolor.stroke_style == 'SOLID' or \ + gpcolor.use_stroke_pattern is True or \ + gpcolor.use_stroke_texture_mix is True: col.prop(gpcolor, "color", text="Color") if gpcolor.mode in {'DOTS', 'BOX'}: @@ -203,7 +209,7 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): col.prop(gpcolor, "pattern_gridsize", text="Box Size") # Texture - if gpcolor.fill_style == 'TEXTURE' or (gpcolor.texture_mix is True and gpcolor.fill_style == 'SOLID'): + if gpcolor.fill_style == 'TEXTURE' or (gpcolor.use_fill_texture_mix is True and gpcolor.fill_style == 'SOLID'): col.template_ID(gpcolor, "fill_image", open="image.open") if gpcolor.fill_style == 'TEXTURE': @@ -218,9 +224,9 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): col.prop(gpcolor, "texture_clamp", text="Clip Image") if gpcolor.use_fill_pattern is False: - col.prop(gpcolor, "texture_mix", text="Mix With Color") + col.prop(gpcolor, "use_fill_texture_mix", text="Mix With Color") - if gpcolor.texture_mix is True: + if gpcolor.use_fill_texture_mix is True: col.prop(gpcolor, "fill_color", text="Mix Color") col.prop(gpcolor, "mix_factor", text="Mix Factor", slider=True) -- cgit v1.2.3