diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-08-29 10:47:08 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-08-29 10:47:08 +0300 |
commit | 613b6ad9e55fe904a90ba9166c8eb2fd654a8d85 (patch) | |
tree | 301f8621568f819adb5191cfb1f5cbda63ad4d94 /source/blender/makesrna | |
parent | 377b81ac0733ff25dba54f9fce6e99f66073e761 (diff) |
GPencil: New conversion to outline in draw mode
This new option converts the stroke to outline perimeter as soon as is drawn.
If no alternative material is set, the actual material is used.
The algorithm is similar to the new operator in D15664
Reviewed By: pepeland
Differential Revision: https://developer.blender.org/D15738
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 82eb390df52..40038921573 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1820,6 +1820,12 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Trim Stroke Ends", "Trim intersecting stroke ends"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + prop = RNA_def_property(srna, "use_settings_outline", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_OUTLINE_STROKE); + RNA_def_property_boolean_default(prop, false); + RNA_def_property_ui_text(prop, "Outline", "Convert stroke to perimeter"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "sculpt_flag"); RNA_def_property_enum_items(prop, prop_direction_items); @@ -1883,6 +1889,15 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_Brush_material_update"); + /* Secondary Material */ + prop = RNA_def_property(srna, "material_alt", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "Material"); + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_BrushGpencilSettings_material_poll"); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK | PROP_CONTEXT_UPDATE); + RNA_def_property_ui_text(prop, "Material", "Material used for secondary uses for this brush"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_Brush_material_update"); + prop = RNA_def_property(srna, "show_fill_boundary", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_SHOW_HELPLINES); RNA_def_property_boolean_default(prop, true); |