diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-04-30 00:04:25 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-04-30 00:04:25 +0400 |
commit | f7ec94cbc6c7dc761f127c50081b3383a58a1c2e (patch) | |
tree | 715ceee7a26b754890954cc38672ae5cfe334a3e /source/blender/makesrna/intern/rna_scene.c | |
parent | 44d81faa432b3b778da10139b652371cfdc7cbb3 (diff) |
Add per-brush weight field.
Patch from Jaggz H, thanks!
[#31096] Weight-painting: Brush-specific weights
http://projects.blender.org/tracker/?func=detail&atid=127&aid=31096&group_id=9
Each brush's weight can now be set individually, can also enable
unified setting (same as size and strength have.)
Added readfile code to the patch: subversion bumped to 1, brushes get
default weight of 0.5, unified weight enabled by default and value
from old vgroup_weight field.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 6a3fd47ba04..ba927a1c739 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1779,6 +1779,11 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Use Unified Strength", "Instead of per-brush strength, the strength is shared across brushes"); + prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_WEIGHT); + RNA_def_property_ui_text(prop, "Use Unified Weight", + "Instead of per-brush weight, the weight is shared across brushes"); + /* unified paint settings that override the equivalent settings * from the active brush */ prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE); @@ -1800,6 +1805,13 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied"); + prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "weight"); + RNA_def_property_float_default(prop, 0.5f); + 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, "Weight", "Weight to assign in vertex groups"); + prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); |