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:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-04-30 00:04:25 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-04-30 00:04:25 +0400
commitf7ec94cbc6c7dc761f127c50081b3383a58a1c2e (patch)
tree715ceee7a26b754890954cc38672ae5cfe334a3e /release
parent44d81faa432b3b778da10139b652371cfdc7cbb3 (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')
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py8
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py4
2 files changed, 11 insertions, 1 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)
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index c494590d005..503229f5593 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -652,13 +652,15 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# Weight Paint Mode #
elif context.weight_paint_object and brush:
- layout.prop(toolsettings, "vertex_group_weight", text="Weight", slider=True)
layout.prop(toolsettings, "use_auto_normalize", text="Auto Normalize")
layout.prop(toolsettings, "use_multipaint", text="Multi-Paint")
col = layout.column()
row = col.row(align=True)
+ self.prop_unified_weight(row, context, brush, "weight", slider=True, text="Weight")
+
+ row = col.row(align=True)
self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
self.prop_unified_size(row, context, brush, "use_pressure_size")