[Bf-blender-cvs] [9670645ccff] greasepencil-refactor: GPencil: Remove Stencil Mask and Mix for Fill material
Antonio Vazquez
noreply at git.blender.org
Thu Dec 12 15:52:58 CET 2019
Commit: 9670645ccff60b73dc2567afbad348b5483e2903
Author: Antonio Vazquez
Date: Thu Dec 12 15:50:56 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB9670645ccff60b73dc2567afbad348b5483e2903
GPencil: Remove Stencil Mask and Mix for Fill material
This is part of the refactor of the darwing engine.
===================================================================
M release/scripts/presets/gpencil_material/fill_only.py
M release/scripts/presets/gpencil_material/stroke_and_fill.py
M release/scripts/presets/gpencil_material/stroke_only.py
M release/scripts/startup/bl_operators/presets.py
M release/scripts/startup/bl_ui/properties_material_gpencil.py
M source/blender/makesrna/intern/rna_material.c
===================================================================
diff --git a/release/scripts/presets/gpencil_material/fill_only.py b/release/scripts/presets/gpencil_material/fill_only.py
index 9114155684b..be045ce5fa4 100644
--- a/release/scripts/presets/gpencil_material/fill_only.py
+++ b/release/scripts/presets/gpencil_material/fill_only.py
@@ -20,13 +20,11 @@ gpcolor.pattern_shift = (0.0, 0.0)
gpcolor.pattern_scale = (1.0, 1.0)
gpcolor.pattern_radius = 0.5
gpcolor.pattern_angle = 0.0
-gpcolor.use_fill_pattern = False
gpcolor.texture_offset = (0.0, 0.0)
gpcolor.texture_scale = (1.0, 1.0)
gpcolor.texture_angle = 0.0
gpcolor.texture_opacity = 1.0
gpcolor.texture_clamp = False
-gpcolor.use_fill_texture_mix = False
gpcolor.mix_factor = 0.0
gpcolor.show_stroke = False
gpcolor.show_fill = True
diff --git a/release/scripts/presets/gpencil_material/stroke_and_fill.py b/release/scripts/presets/gpencil_material/stroke_and_fill.py
index a59ccdd68de..3860c790d16 100644
--- a/release/scripts/presets/gpencil_material/stroke_and_fill.py
+++ b/release/scripts/presets/gpencil_material/stroke_and_fill.py
@@ -20,13 +20,11 @@ gpcolor.pattern_shift = (0.0, 0.0)
gpcolor.pattern_scale = (1.0, 1.0)
gpcolor.pattern_radius = 0.5
gpcolor.pattern_angle = 0.0
-gpcolor.use_fill_pattern = False
gpcolor.texture_offset = (0.0, 0.0)
gpcolor.texture_scale = (1.0, 1.0)
gpcolor.texture_angle = 0.0
gpcolor.texture_opacity = 1.0
gpcolor.texture_clamp = False
-gpcolor.use_fill_texture_mix = False
gpcolor.mix_factor = 0.0
gpcolor.show_stroke = True
gpcolor.show_fill = True
diff --git a/release/scripts/presets/gpencil_material/stroke_only.py b/release/scripts/presets/gpencil_material/stroke_only.py
index ffcba83a8b1..4bd88af7496 100644
--- a/release/scripts/presets/gpencil_material/stroke_only.py
+++ b/release/scripts/presets/gpencil_material/stroke_only.py
@@ -20,13 +20,11 @@ gpcolor.pattern_shift = (0.0, 0.0)
gpcolor.pattern_scale = (1.0, 1.0)
gpcolor.pattern_radius = 0.5
gpcolor.pattern_angle = 0.0
-gpcolor.use_fill_pattern = False
gpcolor.texture_offset = (0.0, 0.0)
gpcolor.texture_scale = (1.0, 1.0)
gpcolor.texture_angle = 0.0
gpcolor.texture_opacity = 1.0
gpcolor.texture_clamp = False
-gpcolor.use_fill_texture_mix = False
gpcolor.mix_factor = 0.0
gpcolor.show_stroke = True
gpcolor.show_fill = False
diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py
index b11a7cc5803..84a68d05d51 100644
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@ -685,13 +685,11 @@ class AddPresetGpencilMaterial(AddPresetBase, Operator):
"gpcolor.pattern_scale",
"gpcolor.pattern_radius",
"gpcolor.pattern_angle",
- "gpcolor.use_fill_pattern",
"gpcolor.texture_offset",
"gpcolor.texture_scale",
"gpcolor.texture_angle",
"gpcolor.texture_opacity",
"gpcolor.texture_clamp",
- "gpcolor.use_fill_texture_mix",
"gpcolor.mix_factor",
"gpcolor.show_stroke",
"gpcolor.show_fill",
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index 9a0cf6178b4..279fb82ec5c 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -151,8 +151,6 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
row.enabled = not gpcolor.lock
col = row.column(align=True)
col.template_ID(gpcolor, "stroke_image", open="image.open")
- if gpcolor.mode == 'LINE':
- col.prop(gpcolor, "pixel_size", text="UV Factor")
row = col.row()
row.prop(gpcolor, "color", text="Base Color")
@@ -160,6 +158,8 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
if gpcolor.stroke_style == 'TEXTURE':
row = col.row()
row.prop(gpcolor, "mix_stroke_factor", text="Factor", slider=True)
+ if gpcolor.mode == 'LINE':
+ col.prop(gpcolor, "pixel_size", text="UV Factor")
if gpcolor.mode in {'DOTS', 'BOX'}:
col.prop(gpcolor, "alignment_mode")
@@ -215,11 +215,11 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
col.prop(gpcolor, "pattern_angle", text="Angle")
# Texture
- if gpcolor.fill_style == 'TEXTURE' or (gpcolor.use_fill_texture_mix is True and gpcolor.fill_style == 'SOLID'):
+ if gpcolor.fill_style == 'TEXTURE':
col.template_ID(gpcolor, "fill_image", open="image.open")
- if gpcolor.fill_style == 'TEXTURE':
- col.prop(gpcolor, "use_fill_pattern", text="Use as Stencil Mask")
+ col.prop(gpcolor, "fill_color", text="Base Color")
+ col.prop(gpcolor, "mix_factor", text="Factor", slider=True)
col.prop(gpcolor, "texture_offset", text="Offset")
col.prop(gpcolor, "texture_scale", text="Scale")
@@ -227,16 +227,6 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
col.prop(gpcolor, "texture_opacity")
col.prop(gpcolor, "texture_clamp", text="Clip Image")
- if gpcolor.use_fill_pattern is False:
- col.prop(gpcolor, "use_fill_texture_mix", text="Mix Color")
-
- if gpcolor.use_fill_texture_mix is True:
- col.prop(gpcolor, "mix_factor", text="Factor", slider=True)
- col.prop(gpcolor, "fill_color", text="Base Color")
-
- if gpcolor.fill_style == 'TEXTURE' and gpcolor.use_fill_pattern is True:
- col.prop(gpcolor, "fill_color", text="Base Color")
-
class MATERIAL_PT_gpencil_preview(GPMaterialButtonsPanel, Panel):
bl_label = "Preview"
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index c862ac79518..e11b69231c7 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -578,21 +578,11 @@ static void rna_def_material_greasepencil(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Clamp", "Do not repeat texture and clamp to one instance only");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
- prop = RNA_def_property(srna, "use_fill_texture_mix", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_FILL_TEX_MIX);
- RNA_def_property_ui_text(prop, "Mix Texture", "Mix texture image with filling color");
- RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
-
prop = RNA_def_property(srna, "flip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_COLOR_FLIP_FILL);
RNA_def_property_ui_text(prop, "Flip", "Flip filling colors");
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
- prop = RNA_def_property(srna, "use_fill_pattern", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_FILL_PATTERN);
- RNA_def_property_ui_text(prop, "Pattern", "Use Fill Texture as a pattern to apply color");
- RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
-
prop = RNA_def_property(srna, "use_overlap_strokes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_DISABLE_STENCIL);
RNA_def_property_ui_text(
More information about the Bf-blender-cvs
mailing list