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:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 24e4dac4ded..54d3b61c665 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -21,6 +21,7 @@ import bpy
from bpy.types import Menu, Panel
from bl_ui.properties_paint_common import UnifiedPaintPanel
from bl_ui.properties_paint_common import brush_texture_settings
+from bl_ui.properties_paint_common import brush_mask_texture_settings
class View3DPanel():
@@ -782,6 +783,34 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
+class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
+ bl_context = "imagepaint"
+ bl_label = "Texture Mask"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ brush = context.tool_settings.image_paint.brush
+ return (context.image_paint_object and brush and brush.image_tool != 'SOFTEN')
+
+ 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_mask_texture_settings(col, brush)
+
+
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
bl_label = "Stroke"
bl_options = {'DEFAULT_CLOSED'}