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:
authorAntony Riakiotakis <kalast@gmail.com>2013-10-09 18:57:48 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-10-09 18:57:48 +0400
commit59b8097cf885d81df21bbff81ab596d27d4755f0 (patch)
tree2bb14c890a28d4857bf1d6166ae84140e5b5b750 /release/scripts/startup/bl_ui/space_image.py
parentde3f6b3ec19d2402be8003e172c69e87c356f310 (diff)
Segregate all paint cursor overlay options under their own "Overlay"
panel in paint modes. Also expose all options of mask textures in the mask texture panel, even if there is no texture, just like regular textures are presented.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r--release/scripts/startup/bl_ui/space_image.py68
1 files changed, 45 insertions, 23 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 398d1596216..99d0179d1da 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -715,8 +715,8 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
col.prop(brush, "clone_alpha", text="Alpha")
-class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
- bl_label = "Texture"
+class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
+ bl_label = "Overlay"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
@@ -725,17 +725,24 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
toolsettings = context.tool_settings.image_paint
brush = toolsettings.brush
tex_slot = brush.texture_slot
+ tex_slot_mask = brush.mask_texture_slot
col = layout.column()
- col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
+
+ col.label(text="Curve:")
- brush_texture_settings(col, brush, 0)
+ row = col.row(align=True)
+ if brush.use_cursor_overlay:
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
- # use_texture_overlay and texture_overlay_alpha
- col = layout.column(align=True)
- col.active = brush.brush_capabilities.has_overlay
- col.label(text="Overlay:")
+ sub = row.row(align=True)
+ sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
+ sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+ col.active = brush.brush_capabilities.has_overlay
+ col.label(text="Texture:")
row = col.row(align=True)
if tex_slot.map_mode != 'STENCIL':
if brush.use_primary_overlay:
@@ -747,6 +754,36 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+ col.label(text="Mask Texture:")
+
+ row = col.row(align=True)
+ if tex_slot_mask.map_mode != 'STENCIL':
+ if brush.use_secondary_overlay:
+ row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+
+ sub = row.row(align=True)
+ sub.prop(brush, "mask_overlay_alpha", text="Alpha")
+ sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+
+
+class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
+ bl_label = "Texture"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ toolsettings = context.tool_settings.image_paint
+ brush = toolsettings.brush
+ tex_slot = brush.texture_slot
+
+ col = layout.column()
+ col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
+
+ brush_texture_settings(col, brush, 0)
+
class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
bl_label = "Texture Mask"
@@ -764,21 +801,6 @@ class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
brush_mask_texture_settings(col, brush)
- col = layout.column(align=True)
- col.active = brush.brush_capabilities.has_overlay
- col.label(text="Overlay:")
-
- row = col.row(align=True)
- if tex_slot_alpha.map_mode != 'STENCIL':
- if brush.use_secondary_overlay:
- row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
- sub = row.row(align=True)
- sub.prop(brush, "mask_overlay_alpha", text="Alpha")
- sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
-
class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
bl_label = "Tool"