diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-15 08:50:47 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-15 08:50:47 +0400 |
commit | a8e9d5533f51455febc40d386c8c2ce0cc561b7a (patch) | |
tree | 6c111b7755a52f0a043a7be285abc5752627f34b /release/scripts/startup/bl_ui/properties_paint_common.py | |
parent | cb24a9505a42b286d3feb1638c8d190f09ad2cd7 (diff) |
Code/UI cleanup: improvements for sculpt brush texture settings.
Settings are shown in both the View3D toolbar and texture properties
panel; code is now in shared sculpt_brush_texture_settings() function
in properties_paint_common.py.
Also added a few new properties to the SculptCapabilities RNA to
replace "X in {Y, Z}" tests in the Python code.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 34 |
1 files changed, 34 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 94df1ed6cf5..53cf640beb9 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -67,3 +67,37 @@ class UnifiedPaintPanel(): 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) + + +# Used in both the View3D toolbar and texture properties +def sculpt_brush_texture_settings(layout, brush): + tex_slot = brush.texture_slot + + layout.label(text="Brush Mapping:") + + # map_mode + layout.row().prop(tex_slot, "map_mode", text="") + layout.separator() + + # angle and texture_angle_source + col = layout.column() + col.active = brush.sculpt_capabilities.has_texture_angle_source + col.label(text="Angle:") + if brush.sculpt_capabilities.has_random_texture_angle: + col.prop(brush, "texture_angle_source_random", text="") + else: + col.prop(brush, "texture_angle_source_no_random", text="") + + col = layout.column() + col.active = brush.sculpt_capabilities.has_texture_angle + col.prop(tex_slot, "angle", text="") + + # scale and offset + split = layout.split() + split.prop(tex_slot, "offset") + split.prop(tex_slot, "scale") + + # texture_sample_bias + col = layout.column(align=True) + col.label(text="Sample Bias:") + col.prop(brush, "texture_sample_bias", slider=True, text="") |