diff options
author | Antonioya <blendergit@gmail.com> | 2019-04-18 15:19:00 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-04-18 20:33:06 +0300 |
commit | 4dce18fb51f17269161d1c2a16571502b97a860b (patch) | |
tree | 1479ee2f358ff688c4b4da79832da566930fdfca /source/blender/makesrna | |
parent | 4439e5d0ba3ffde3841ec44405a9bcaf800be279 (diff) |
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.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 8fb26e47913..d986f473791 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -475,6 +475,13 @@ static void rna_def_material_greasepencil(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Mix", "Mix Adjustment Factor"); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); + /* Stroke Mix factor */ + prop = RNA_def_property(srna, "mix_stroke_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "mix_stroke_factor"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Mix", "Mix Stroke Color"); + RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); + /* Scale factor for uv coordinates */ prop = RNA_def_property(srna, "pattern_scale", PROP_FLOAT, PROP_COORDS); RNA_def_property_float_sdna(prop, NULL, "gradient_scale"); @@ -569,9 +576,14 @@ 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, "texture_mix", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_COLOR_TEX_MIX); - RNA_def_property_ui_text(prop, "Mix Texture", "Mix texture image with filling colors"); + 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, "use_stroke_texture_mix", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_STROKE_TEX_MIX); + RNA_def_property_ui_text(prop, "Mix Texture", "Mix texture image with stroke color"); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); prop = RNA_def_property(srna, "flip", PROP_BOOLEAN, PROP_NONE); |