diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-11-08 18:55:59 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-11-08 18:55:59 +0300 |
commit | 4c182aef7ce0e8c26dd2b85c1fa2cd45c2ef64ea (patch) | |
tree | b30ce7abaa65be85c147222cb074571c056b59df /source/blender/makesrna/intern/rna_brush.c | |
parent | bbb1d3e5e7eb4059a0324ae786e1e793852963a9 (diff) |
GPencil: Make Sculpt Auto-masking Global and not by Brush
The auto-masking was working by Brush and this was very
inconvenient because it was necessary set the options by
Brush, now the options are global and can be set at once.
Also, the automa-masking now works with `and` logic
and not with `or` as before. That means that a stroke
must meet all the conditions of the masking.
Added new Layer and Material options to masking the
strokes using the same Layer/Material of the selected stroke.
Before, only Active Layer and Active Material could be masked.
The options of masking has been moved to the top-bar using
the same design of Mesh Sculpt masking.
As result of the changes above, the following props changed:
Removed:
`brush.gpencil_settings.use_automasking_strokes`
`brush.gpencil_settings.use_automasking_layer`
`brush.gpencil_settings.use_automasking_material`
Added:
`tool_settings.gpencil_sculpt.use_automasking_stroke`
`tool_settings.gpencil_sculpt.use_automasking_layer_stroke`
`tool_settings.gpencil_sculpt.use_automasking_material_stroke`
`tool_settings.gpencil_sculpt.use_automasking_layer_active`
`tool_settings.gpencil_sculpt.use_automasking_material_active`
Reviewed by: Julien Kaspar, Matias Mendiola, Daniel Martinez Lara
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 5ba31070e1d..ce51b52de39 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1919,26 +1919,6 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - prop = RNA_def_property(srna, "use_automasking_stroke", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna( - prop, NULL, "sculpt_mode_flag", GP_SCULPT_FLAGMODE_AUTOMASK_STROKE); - RNA_def_property_ui_text(prop, "Auto-Masking Strokes", "Mask strokes below brush cursor"); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - - prop = RNA_def_property(srna, "use_automasking_layer", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "sculpt_mode_flag", GP_SCULPT_FLAGMODE_AUTOMASK_LAYER); - RNA_def_property_ui_text(prop, "Auto-Masking Layer", "Mask strokes using active layer"); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - - prop = RNA_def_property(srna, "use_automasking_material", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna( - prop, NULL, "sculpt_mode_flag", GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL); - RNA_def_property_ui_text(prop, "Auto-Masking Material", "Mask strokes using active material"); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - /* Material */ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Material"); |