Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_paint_common.py
| Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | class TextureMaskPanel(BrushPanel): | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| layout.use_property_decorate = False | layout.use_property_decorate = False | ||||
| brush = context.tool_settings.image_paint.brush | brush = context.tool_settings.image_paint.brush | ||||
| mask_tex_slot = brush.mask_texture_slot | |||||
| col = layout.column() | col = layout.column() | ||||
| 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) | ||||
| mask_tex_slot = brush.mask_texture_slot | |||||
| # map_mode | # map_mode | ||||
| layout.row().prop(mask_tex_slot, "mask_map_mode", text="Mask Mapping") | layout.row().prop(mask_tex_slot, "mask_map_mode", text="Mask Mapping") | ||||
| if mask_tex_slot.map_mode == 'STENCIL': | if mask_tex_slot.map_mode == 'STENCIL': | ||||
| if brush.mask_texture and brush.mask_texture.type == 'IMAGE': | if brush.mask_texture and brush.mask_texture.type == 'IMAGE': | ||||
| layout.operator("brush.stencil_fit_image_aspect").mask = True | layout.operator("brush.stencil_fit_image_aspect").mask = True | ||||
| layout.operator("brush.stencil_reset_transform").mask = True | layout.operator("brush.stencil_reset_transform").mask = True | ||||
| ▲ Show 20 Lines • Show All 1,062 Lines • Show Last 20 Lines | |||||