Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Vazquez <pablovazquez>2022-10-17 12:17:42 +0300
committerPablo Vazquez <pablo@blender.org>2022-10-17 12:23:16 +0300
commitdb40b62252e5a7716cd403a0574cc164163b2ce9 (patch)
tree4f6e0e16707e80f26cfe1aa30037b7f3384139c8 /source/blender/makesrna/intern/rna_brush.c
parent11bb38e887d29635498fb184f6434144546e9fb4 (diff)
Sculpt: Auto-masking UI improvements
Add auto-masking as a popover in the header while in Sculpt mode, following the design in T101593. These properties were present in the Options panel (and popover), they have been removed from there. Moreover, this commit makes the auto-masking section in Brush settings match the new popover. In the future this popover can be used for other modes that support auto-masking such as Grease Pencil. See D16145 for details and screenshots. Reviewed By: JulienKaspar Differential Revision: https://developer.blender.org/D16145
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 5e4b08d8a41..b44b0620329 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -3240,18 +3240,21 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Brush_update");
} while ((++entry)->identifier);
- prop = RNA_def_property(srna, "automasking_cavity_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "automasking_cavity_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "automasking_cavity_factor");
+ RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop, "Cavity Factor", "The contrast of the cavity mask");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop = RNA_def_property(srna, "automasking_cavity_blur_steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "automasking_cavity_blur_steps");
+ RNA_def_property_int_default(prop, 0);
RNA_def_property_ui_text(prop, "Blur Steps", "The number of times the cavity mask is blurred");
- RNA_def_property_range(prop, 0.0f, 25.0f);
+ RNA_def_property_range(prop, 0, 25);
+ RNA_def_property_ui_range(prop, 0, 10, 1, 1);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, 0, "rna_Brush_update");