diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-01-16 16:57:35 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-01-16 16:57:35 +0400 |
commit | cb8158cce6a35adb06c6e003a43c686aa88ebc4d (patch) | |
tree | b9294a00b7a785e8b0c0deaa9bbefe27b6556b8d /release/scripts/startup/bl_ui/properties_paint_common.py | |
parent | 2095b2cddba2bdad057ceef54a1046c522389ff5 (diff) |
Unification of brush code
* rename sculpt_brush_texture_settings to brush_texture_settings
* Expose texture scale and offset in texture paint mode
* Introduce still inactive mapping mode for texture paint, tiled and
view aligned only. Projective paint uses only tiled, while 2d paint can
use both. Commit will come that will use both appropriately for both
modes, omitting fixed brush flag (which is tiled with another name)
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 53cf640beb9..022f2500940 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -70,34 +70,40 @@ class UnifiedPaintPanel(): # Used in both the View3D toolbar and texture properties -def sculpt_brush_texture_settings(layout, brush): +def brush_texture_settings(layout, brush, sculpt): 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="") + if sculpt: + layout.row().prop(tex_slot, "map_mode", text="") + layout.separator() else: - col.prop(brush, "texture_angle_source_no_random", text="") - + layout.row().prop(tex_slot, "tex_paint_map_mode", text="") + layout.separator() + + # angle and texture_angle_source col = layout.column() - col.active = brush.sculpt_capabilities.has_texture_angle - col.prop(tex_slot, "angle", text="") + if sculpt: + 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="") + + if sculpt: + # texture_sample_bias + col = layout.column(align=True) + col.label(text="Sample Bias:") + col.prop(brush, "texture_sample_bias", slider=True, text="") |