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.
This commit is contained in:
parent
de3f6b3ec1
commit
59b8097cf8
@ -134,7 +134,6 @@ def brush_mask_texture_settings(layout, brush):
|
|||||||
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
|
||||||
|
|
||||||
if brush.mask_texture:
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.label(text="Angle:")
|
col.label(text="Angle:")
|
||||||
col.active = brush.brush_capabilities.has_texture_angle
|
col.active = brush.brush_capabilities.has_texture_angle
|
||||||
|
@ -715,6 +715,59 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
|
|||||||
col.prop(brush, "clone_alpha", text="Alpha")
|
col.prop(brush, "clone_alpha", text="Alpha")
|
||||||
|
|
||||||
|
|
||||||
|
class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
|
||||||
|
bl_label = "Overlay"
|
||||||
|
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
|
||||||
|
tex_slot_mask = brush.mask_texture_slot
|
||||||
|
|
||||||
|
col = layout.column()
|
||||||
|
|
||||||
|
col.label(text="Curve:")
|
||||||
|
|
||||||
|
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')
|
||||||
|
|
||||||
|
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:
|
||||||
|
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
|
||||||
|
else:
|
||||||
|
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
|
||||||
|
|
||||||
|
sub = row.row(align=True)
|
||||||
|
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):
|
class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
|
||||||
bl_label = "Texture"
|
bl_label = "Texture"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
@ -731,22 +784,6 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
|
|||||||
|
|
||||||
brush_texture_settings(col, brush, 0)
|
brush_texture_settings(col, brush, 0)
|
||||||
|
|
||||||
# use_texture_overlay and texture_overlay_alpha
|
|
||||||
col = layout.column(align=True)
|
|
||||||
col.active = brush.brush_capabilities.has_overlay
|
|
||||||
col.label(text="Overlay:")
|
|
||||||
|
|
||||||
row = col.row(align=True)
|
|
||||||
if tex_slot.map_mode != 'STENCIL':
|
|
||||||
if brush.use_primary_overlay:
|
|
||||||
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
|
|
||||||
else:
|
|
||||||
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
|
|
||||||
|
|
||||||
sub = row.row(align=True)
|
|
||||||
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
|
|
||||||
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
|
||||||
|
|
||||||
|
|
||||||
class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
|
class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
|
||||||
bl_label = "Texture Mask"
|
bl_label = "Texture Mask"
|
||||||
@ -764,21 +801,6 @@ class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
|
|||||||
|
|
||||||
brush_mask_texture_settings(col, brush)
|
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):
|
class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
|
||||||
bl_label = "Tool"
|
bl_label = "Tool"
|
||||||
|
@ -673,19 +673,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
|||||||
col.prop(brush, "use_persistent")
|
col.prop(brush, "use_persistent")
|
||||||
col.operator("sculpt.set_persistent_base")
|
col.operator("sculpt.set_persistent_base")
|
||||||
|
|
||||||
col = layout.column(align=True)
|
|
||||||
col.label(text="Overlay:")
|
|
||||||
|
|
||||||
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')
|
|
||||||
|
|
||||||
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')
|
|
||||||
|
|
||||||
# Texture Paint Mode #
|
# Texture Paint Mode #
|
||||||
|
|
||||||
elif context.image_paint_object and brush:
|
elif context.image_paint_object and brush:
|
||||||
@ -709,19 +696,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
|||||||
col.active = (brush.blend not in {'ERASE_ALPHA', 'ADD_ALPHA'})
|
col.active = (brush.blend not in {'ERASE_ALPHA', 'ADD_ALPHA'})
|
||||||
col.prop(brush, "use_alpha")
|
col.prop(brush, "use_alpha")
|
||||||
|
|
||||||
col = layout.column(align=True)
|
|
||||||
col.label(text="Overlay:")
|
|
||||||
|
|
||||||
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')
|
|
||||||
|
|
||||||
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')
|
|
||||||
|
|
||||||
# Weight Paint Mode #
|
# Weight Paint Mode #
|
||||||
elif context.weight_paint_object and brush:
|
elif context.weight_paint_object and brush:
|
||||||
|
|
||||||
@ -765,8 +739,21 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
|||||||
|
|
||||||
col.prop(brush, "vertex_tool", text="Blend")
|
col.prop(brush, "vertex_tool", text="Blend")
|
||||||
|
|
||||||
col = layout.column(align=True)
|
class IMAGE_PT_tools_brush_overlay(View3DPaintPanel, Panel):
|
||||||
col.label(text="Overlay:")
|
bl_label = "Overlay"
|
||||||
|
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
|
||||||
|
tex_slot_mask = brush.mask_texture_slot
|
||||||
|
|
||||||
|
col = layout.column()
|
||||||
|
|
||||||
|
col.label(text="Curve:")
|
||||||
|
|
||||||
row = col.row(align=True)
|
row = col.row(align=True)
|
||||||
if brush.use_cursor_overlay:
|
if brush.use_cursor_overlay:
|
||||||
@ -778,6 +765,33 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
|||||||
sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
|
sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
|
||||||
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
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:
|
||||||
|
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
|
||||||
|
else:
|
||||||
|
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
|
||||||
|
|
||||||
|
sub = row.row(align=True)
|
||||||
|
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
|
||||||
|
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
||||||
|
|
||||||
|
if context.image_paint_object:
|
||||||
|
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 VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
|
class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
|
||||||
bl_label = "Texture"
|
bl_label = "Texture"
|
||||||
@ -802,22 +816,6 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
|
|||||||
|
|
||||||
brush_texture_settings(col, brush, context.sculpt_object)
|
brush_texture_settings(col, brush, context.sculpt_object)
|
||||||
|
|
||||||
# use_texture_overlay and texture_overlay_alpha
|
|
||||||
col = layout.column(align=True)
|
|
||||||
col.active = brush.brush_capabilities.has_overlay
|
|
||||||
col.label(text="Overlay:")
|
|
||||||
|
|
||||||
row = col.row(align=True)
|
|
||||||
if tex_slot.map_mode != 'STENCIL':
|
|
||||||
if brush.use_primary_overlay:
|
|
||||||
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
|
|
||||||
else:
|
|
||||||
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
|
|
||||||
|
|
||||||
sub = row.row(align=True)
|
|
||||||
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
|
|
||||||
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
|
class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
|
||||||
bl_context = "imagepaint"
|
bl_context = "imagepaint"
|
||||||
@ -841,21 +839,6 @@ class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
|
|||||||
|
|
||||||
brush_mask_texture_settings(col, brush)
|
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 VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
|
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
|
||||||
bl_label = "Stroke"
|
bl_label = "Stroke"
|
||||||
|
Loading…
Reference in New Issue
Block a user