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 Dobarro <pablodp606>2020-03-01 21:57:44 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-03-01 22:05:58 +0300
commitff0124418f42dc12f31b00faf23276db961e2e51 (patch)
tree56dbd9be3bf1f967b997fe6fddb86125dd40dc75 /source/blender/makesrna/intern/rna_brush.c
parentfc7fdc5c4ed69809bcecc5762957aa42375ca6a2 (diff)
Sculpt: Hardness brush property
The hardness property moves the brush falloff towards the edges, making the brush sharper. This should be the intended way to control the brush falloff instead of tweaking the falloff curve manually, as it can be mapped to pressure to make the falloff variable during the stroke. It is also a good idea to show in the UI that the custom curves is an advance features and it should almost never be modified when sculpting/ painting unless you want to create some advanced effects. By modifying the curves freely it is really easy to break the brushes and make them produce artifacts. This needs to be done in a later after merging the pending projects to reorganize all the brush properties accordingly. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6902
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 5f30e299a12..cfaaa0cd1b3 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -2012,6 +2012,13 @@ static void rna_def_brush(BlenderRNA *brna)
"Area to apply deformation falloff to the effects of the simulation");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "hardness", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "hardness");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(
+ prop, "Hardness", "How close the brush falloff starts from the edge of the brush");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "auto_smooth_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "autosmooth_factor");
RNA_def_property_float_default(prop, 0);