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-01-12 21:22:32 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-01-12 21:22:32 +0400
commit9fe88a8488ad9e209956f047496c838f38562c19 (patch)
treea26ef83231a995364e8382fd5e56665fe38c8e5c /release
parentb20a56b2caa25b06c33e0aa85f17b0b5a9145b5e (diff)
Move unified paint fields from ToolSettings into their own UnifiedPaintSettings struct.
File subversion is bumped to two in order to copy over the old fields. This removes two RNA properties, sculpt_paint_use_unified_size and sculpt_paint_use_unified_strength. Code review link: http://codereview.appspot.com/5529077
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py27
1 files changed, 13 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 25f81f2cde1..e89e2d9f484 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -468,6 +468,13 @@ class PaintPanel():
return None
+ @staticmethod
+ def unified_paint_settings(parent, context):
+ ups = context.tool_settings.unified_paint_settings
+ parent.label(text="Unified Settings:")
+ parent.prop(ups, "use_unified_size", text="Size")
+ parent.prop(ups, "use_unified_strength", text="Strength")
+
class VIEW3D_PT_tools_brush(PaintPanel, Panel):
bl_label = "Brush"
@@ -950,9 +957,7 @@ class VIEW3D_PT_sculpt_options(PaintPanel, Panel):
layout.prop(sculpt, "show_brush")
layout.prop(sculpt, "use_deform_only")
- layout.label(text="Unified Settings:")
- layout.prop(tool_settings, "sculpt_paint_use_unified_size", text="Size")
- layout.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Strength")
+ self.unified_paint_settings(layout, context)
class VIEW3D_PT_sculpt_symmetry(PaintPanel, Panel):
@@ -1041,7 +1046,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
col.operator("object.vertex_group_fix", text="Fix Deforms")
-class VIEW3D_PT_tools_weightpaint_options(View3DPanel, Panel):
+class VIEW3D_PT_tools_weightpaint_options(PaintPanel, Panel):
bl_context = "weightpaint"
bl_label = "Options"
@@ -1062,9 +1067,7 @@ class VIEW3D_PT_tools_weightpaint_options(View3DPanel, Panel):
col.prop(mesh, "use_mirror_x")
col.prop(mesh, "use_mirror_topology")
- col.label(text="Unified Settings:")
- col.prop(tool_settings, "sculpt_paint_use_unified_size", text="Size")
- col.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Strength")
+ self.unified_paint_settings(col, context)
# Commented out because the Apply button isn't an operator yet, making these settings useless
# col.label(text="Gamma:")
@@ -1078,7 +1081,7 @@ class VIEW3D_PT_tools_weightpaint_options(View3DPanel, Panel):
# ********** default tools for vertex-paint ****************
-class VIEW3D_PT_tools_vertexpaint(View3DPanel, Panel):
+class VIEW3D_PT_tools_vertexpaint(PaintPanel, Panel):
bl_context = "vertexpaint"
bl_label = "Options"
@@ -1094,9 +1097,7 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel, Panel):
col.prop(vpaint, "use_normal")
col.prop(vpaint, "use_spray")
- col.label(text="Unified Settings:")
- col.prop(tool_settings, "sculpt_paint_use_unified_size", text="Size")
- col.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Strength")
+ self.unified_paint_settings(col, context)
# Commented out because the Apply button isn't an operator yet, making these settings useless
# col.label(text="Gamma:")
@@ -1187,9 +1188,7 @@ class VIEW3D_PT_imagepaint_options(PaintPanel):
tool_settings = context.tool_settings
col = layout.column()
- col.label(text="Unified Settings:")
- col.prop(tool_settings, "sculpt_paint_use_unified_size", text="Size")
- col.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Strength")
+ self.unified_paint_settings(col, context)
class VIEW3D_MT_tools_projectpaint_clone(Menu):