diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 34eee9415d9..31775a70af6 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -134,12 +134,20 @@ const EnumPropertyItem rna_enum_object_greasepencil_modifier_type_items[] = { #ifndef RNA_RUNTIME static const EnumPropertyItem modifier_modify_color_items[] = { - {GP_MODIFY_COLOR_BOTH, "BOTH", 0, "Both", "Modify fill and stroke colors"}, + {GP_MODIFY_COLOR_BOTH, "BOTH", 0, "Stroke and Fill", "Modify fill and stroke colors"}, {GP_MODIFY_COLOR_STROKE, "STROKE", 0, "Stroke", "Modify stroke color only"}, {GP_MODIFY_COLOR_FILL, "FILL", 0, "Fill", "Modify fill color only"}, {0, NULL, 0, NULL, NULL}, }; +static const EnumPropertyItem modifier_modify_opacity_items[] = { + {GP_MODIFY_COLOR_BOTH, "BOTH", 0, "Stroke and Fill", "Modify fill and stroke colors"}, + {GP_MODIFY_COLOR_STROKE, "STROKE", 0, "Stroke", "Modify stroke color only"}, + {GP_MODIFY_COLOR_FILL, "FILL", 0, "Fill", "Modify fill color only"}, + {GP_MODIFY_COLOR_HARDENESS, "HARDENESS", 0, "Hardeness", "Modify stroke hardeness"}, + {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", ""}, @@ -1324,7 +1332,7 @@ static void rna_def_modifier_gpencilopacity(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_MOD_OPACITY); prop = RNA_def_property(srna, "modify_color", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, modifier_modify_color_items); /* share the enum */ + RNA_def_property_enum_items(prop, modifier_modify_opacity_items); RNA_def_property_ui_text(prop, "Mode", "Set what colors of the stroke are affected"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); @@ -1352,6 +1360,14 @@ static void rna_def_modifier_gpencilopacity(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Opacity Factor", "Factor of Opacity"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "hardeness", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "hardeness"); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 0.1, 2); + RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_ui_text(prop, "Hardeness", "Factor of stroke hardeness"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pass_index"); RNA_def_property_range(prop, 0, 100); |