diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-11-19 00:47:23 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-11-21 19:55:36 +0300 |
commit | 15f82278d5d4ca2b282cb8e5e377965cf28aaa17 (patch) | |
tree | 3baf4f638dec52fde9802699a2bb1a2ea261efe1 /source/blender/makesrna/intern/rna_brush.c | |
parent | 2ec9aa3b71f4ebd9676326b690aaf3049849adee (diff) |
Sculpt/Paint: Dash Ratio and Dash Samples
Dash Ratio and Dash Samples are brush properties to modify the strength of the brush during a stroke. This is useful to create dashed lines in texture paint or stitches in sculpt mode.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D5949
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index a392e4c080f..3f269299461 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1788,6 +1788,22 @@ static void rna_def_brush(BlenderRNA *brna) prop, "Strength", "How powerful the effect of the brush is when applied"); RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "dash_ratio", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "dash_ratio"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); + RNA_def_property_ui_text( + prop, "Dash Ratio", "Ratio of samples in a cycle that the brush is enabled"); + RNA_def_property_update(prop, 0, "rna_Brush_update"); + + prop = RNA_def_property(srna, "dash_samples", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "dash_samples"); + RNA_def_property_range(prop, 1, 10000); + RNA_def_property_ui_range(prop, 1, 10000, 5, -1); + RNA_def_property_ui_text( + prop, "Dash Length", "Length of a dash cycle measured in stroke samples"); + RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "plane_offset", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "plane_offset"); RNA_def_property_float_default(prop, 0); |