From 0d70e8a4fd6a2d04f0bc37ad4d0eb6eea8d831ce Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 14 Mar 2013 02:27:36 +0000 Subject: Two new Features: * Support for Rake in projective paint (2D painting will be a separate commit) * Support for smooth stroke across all paint systems --- .../startup/bl_ui/properties_paint_common.py | 25 +++++++++------ .../scripts/startup/bl_ui/space_view3d_toolbar.py | 36 ++++++++++------------ 2 files changed, 32 insertions(+), 29 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 7c06aefe575..a3275bea4ee 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -85,17 +85,22 @@ def brush_texture_settings(layout, brush, sculpt): # angle and texture_angle_source col = layout.column() - 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="") + col.active = brush.brush_capabilities.has_texture_angle_source + col.label(text="Angle:") + if brush.brush_capabilities.has_random_texture_angle: + if sculpt: + 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="") + 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="") + col.prop(brush, "texture_angle_source_random", text="") + else: + col.prop(brush, "texture_angle_source_no_random", text="") + col = layout.column() + col.active = brush.brush_capabilities.has_texture_angle + col.prop(tex_slot, "angle", text="") # scale and offset split = layout.split() diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 54e5741a142..dc18bd2544c 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -766,19 +766,18 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel): brush_texture_settings(col, brush, context.sculpt_object) - if context.sculpt_object: - # use_texture_overlay and texture_overlay_alpha - col = layout.column(align=True) - col.active = brush.sculpt_capabilities.has_overlay - col.label(text="Overlay:") + # use_texture_overlay and texture_overlay_alpha + col = layout.column(align=True) + col.active = brush.brush_capabilities.has_overlay + col.label(text="Overlay:") - row = col.row() - if brush.use_texture_overlay: - row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF') - else: - row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') - sub = row.row() - sub.prop(brush, "texture_overlay_alpha", text="Alpha") + row = col.row() + if brush.use_texture_overlay: + row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF') + else: + row.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') + sub = row.row() + sub.prop(brush, "texture_overlay_alpha", text="Alpha") class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel): @@ -855,18 +854,17 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel): col.separator() - if not image_paint: - col.prop(brush, "use_smooth_stroke") + col.prop(brush, "use_smooth_stroke") - col = layout.column() - col.active = brush.use_smooth_stroke - col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True) - col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True) + col = layout.column() + col.active = brush.use_smooth_stroke + col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True) + col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True) col.separator() col = layout.column() - col.active = brush.sculpt_capabilities.has_spacing + col.active = brush.brush_capabilities.has_spacing col.prop(brush, "use_space") row = col.row(align=True) -- cgit v1.2.3