[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49960] branches/soc-2012-bratwurst/ release/scripts/startup/bl_ui: Texture Paint Alpha Masks
Antony Riakiotakis
kalast at gmail.com
Fri Aug 17 19:52:26 CEST 2012
Revision: 49960
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49960
Author: psy-fi
Date: 2012-08-17 17:52:26 +0000 (Fri, 17 Aug 2012)
Log Message:
-----------
Texture Paint Alpha Masks
==========================
* Cleanup of panels
Modified Paths:
--------------
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_image.py
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
Modified: branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_image.py 2012-08-17 17:36:38 UTC (rev 49959)
+++ branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_image.py 2012-08-17 17:52:26 UTC (rev 49960)
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu, Panel
from bl_ui.properties_paint_common import UnifiedPaintPanel
+from bl_ui.properties_paint_common import brush_texture_settings
class ImagePaintPanel(UnifiedPaintPanel):
@@ -720,11 +721,30 @@
col = layout.column()
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
- col.label(text='Mask Texture')
- col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8)
col.prop(brush, "use_fixed_texture")
+class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
+ bl_label = "Texture Mask"
+ bl_options = {'DEFAULT_CLOSED'}
+ def draw_header(self, context):
+ brush = context.tool_settings.image_paint.brush
+ tex_slot_alpha = brush.mask_texture_slot
+ self.layout.prop(brush, 'use_mask', text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ brush = context.tool_settings.image_paint.brush
+ tex_slot_alpha = brush.mask_texture_slot
+
+ col = layout.column()
+
+ col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8)
+
+ brush_texture_settings(col, brush, context.sculpt_object)
+
+
class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
bl_label = "Tool"
bl_options = {'DEFAULT_CLOSED'}
Modified: branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2012-08-17 17:36:38 UTC (rev 49959)
+++ branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2012-08-17 17:52:26 UTC (rev 49960)
@@ -774,21 +774,7 @@
brush_texture_settings(col, brush, context.sculpt_object)
- # use_texture_overlay and texture_overlay_alpha
- col = layout.column(align=True)
- col.active = brush.paint_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")
-
-
-
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
bl_label = "Stroke"
bl_options = {'DEFAULT_CLOSED'}
More information about the Bf-blender-cvs
mailing list