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 /release/scripts/startup/bl_ui/properties_paint_common.py | |
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 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 25ea85a9a6a..94df1ed6cf5 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -47,6 +47,8 @@ class UnifiedPaintPanel(): parent.label(text="Unified Settings:") parent.prop(ups, "use_unified_size", text="Size") parent.prop(ups, "use_unified_strength", text="Strength") + if context.weight_paint_object: + parent.prop(ups, "use_unified_weight", text="Weight") @staticmethod def prop_unified_size(parent, context, brush, prop_name, icon='NONE', text="", slider=False): @@ -59,3 +61,9 @@ class UnifiedPaintPanel(): ups = context.tool_settings.unified_paint_settings ptr = ups if ups.use_unified_strength else brush parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider) + + @staticmethod + def prop_unified_weight(parent, context, brush, prop_name, icon='NONE', text="", slider=False): + ups = context.tool_settings.unified_paint_settings + ptr = ups if ups.use_unified_weight else brush + parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider) |