diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-09-02 14:31:05 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-09-02 14:31:37 +0300 |
commit | 591db72ee2ee4c731968754f0be288e9222c012d (patch) | |
tree | 404a81c4b740cc9628c37f5ba4d787e6e1c3a842 /source/blender/makesrna/intern/rna_gpencil_modifier.c | |
parent | a6816bf5db0cddd98d55c21a12a545a86bb0c004 (diff) |
GPencil: New Strength mode for Opacity modifier
This new option applies the opacity using the strength of the stroke instead to use the alpha channel of the material.
Tested in greasepencil-object branch
{F7712796}
The vertex group filter has been removed because this filter is not logic in Material mode and must be valid only in Strength mode.
{F7713147}
Reviewers: pepeland, mendio
Reviewed By: mendio
Differential Revision: https://developer.blender.org/D5650
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 0b40cc9f7f9..f4458a49768 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -133,6 +133,16 @@ static const EnumPropertyItem modifier_modify_color_items[] = { {0, NULL, 0, NULL, NULL}, }; +static const EnumPropertyItem modifier_opacity_mode_items[] = { + {GP_OPACITY_MODE_MATERIAL, + "MATERIAL", + 0, + "Material", + "Modify opacity using alpha channel of material"}, + {GP_OPACITY_MODE_STRENGTH, "STRENGTH", 0, "Strength", "Modify opacity using point strength"}, + {0, NULL, 0, NULL, NULL}, +}; + static const EnumPropertyItem modifier_gphook_falloff_items[] = { {eGPHook_Falloff_None, "NONE", 0, "No Falloff", ""}, {eGPHook_Falloff_Curve, "CURVE", 0, "Curve", ""}, @@ -1164,6 +1174,11 @@ static void rna_def_modifier_gpencilopacity(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Mode", "Set what colors of the stroke are affected"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "opacity_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, modifier_opacity_mode_items); + RNA_def_property_ui_text(prop, "Opacity Mode", "Set what mode used to define opacity"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "layer", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "layername"); RNA_def_property_ui_text(prop, "Layer", "Layer name"); |