Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d_toolbar.py
| Show First 20 Lines • Show All 625 Lines • ▼ Show 20 Lines | def poll(cls, context): | ||||
| return (settings and settings.brush and | return (settings and settings.brush and | ||||
| (context.sculpt_object or context.image_paint_object or context.vertex_paint_object)) | (context.sculpt_object or context.image_paint_object or context.vertex_paint_object)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| settings = self.paint_settings(context) | settings = self.paint_settings(context) | ||||
| brush = settings.brush | brush = settings.brush | ||||
| tex_slot = brush.texture_slot | |||||
| col = layout.column() | col = layout.column() | ||||
| col.template_ID_preview(tex_slot, "texture", new="texture.new", rows=3, cols=8) | |||||
| col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8) | |||||
| brush_texture_settings(col, brush, context.sculpt_object) | brush_texture_settings(col, brush, context.sculpt_object) | ||||
| # TODO, move to space_view3d.py | # TODO, move to space_view3d.py | ||||
| class VIEW3D_PT_tools_mask_texture(Panel, View3DPaintPanel, TextureMaskPanel): | class VIEW3D_PT_tools_mask_texture(Panel, View3DPaintPanel, TextureMaskPanel): | ||||
| bl_category = "Tool" | bl_category = "Tool" | ||||
| bl_context = ".imagepaint" # dot on purpose (access from topbar) | bl_context = ".imagepaint" # dot on purpose (access from topbar) | ||||
| bl_parent_id = "VIEW3D_PT_tools_brush_settings" | bl_parent_id = "VIEW3D_PT_tools_brush_settings" | ||||
| bl_label = "Texture Mask" | bl_label = "Texture Mask" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| settings = cls.paint_settings(context) | settings = cls.paint_settings(context) | ||||
| return (settings and settings.brush and context.image_paint_object) | return (settings and settings.brush and context.image_paint_object) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| brush = context.tool_settings.image_paint.brush | brush = context.tool_settings.image_paint.brush | ||||
| col = layout.column() | col = layout.column() | ||||
| mask_tex_slot = brush.mask_texture_slot | |||||
| col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8) | col.template_ID_preview(mask_tex_slot, "texture", new="texture.new", rows=3, cols=8) | ||||
| brush_mask_texture_settings(col, brush) | brush_mask_texture_settings(col, brush) | ||||
| # TODO, move to space_view3d.py | # TODO, move to space_view3d.py | ||||
| class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel, StrokePanel): | class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel, StrokePanel): | ||||
| bl_context = ".paint_common" # dot on purpose (access from topbar) | bl_context = ".paint_common" # dot on purpose (access from topbar) | ||||
| bl_label = "Stroke" | bl_label = "Stroke" | ||||
| ▲ Show 20 Lines • Show All 1,569 Lines • Show Last 20 Lines | |||||