688
702
col = layout.column()
689
col.template_color_picker(brush, "color", value_slider=True)
690
col.prop(brush, "color", text="")
704
if brush.image_tool == 'DRAW' and brush.blend not in ('ERASE_ALPHA', 'ADD_ALPHA'):
705
col.template_color_picker(brush, "color", value_slider=True)
706
col.prop(brush, "color", text="")
692
708
row = col.row(align=True)
693
709
self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
698
714
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
700
716
row = col.row(align=True)
701
row.prop(brush, "jitter", slider=True)
702
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
704
718
col.prop(brush, "blend", text="Blend")
719
733
toolsettings = context.tool_settings.image_paint
720
734
brush = toolsettings.brush
735
tex_slot = brush.texture_slot
722
737
col = layout.column()
723
738
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
725
740
brush_texture_settings(col, brush, 0)
742
# use_texture_overlay and texture_overlay_alpha
743
col = layout.column(align=True)
744
col.active = brush.brush_capabilities.has_overlay
745
col.label(text="Overlay:")
748
if tex_slot.map_mode != 'STENCIL':
749
if brush.use_primary_overlay:
750
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
752
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
755
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
756
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
759
class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
760
bl_label = "Texture Mask"
761
bl_options = {'DEFAULT_CLOSED'}
763
def draw(self, context):
766
brush = context.tool_settings.image_paint.brush
767
tex_slot_alpha = brush.mask_texture_slot
769
col = layout.column()
771
col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8)
773
brush_mask_texture_settings(col, brush)
775
col = layout.column(align=True)
776
col.active = brush.brush_capabilities.has_overlay
777
col.label(text="Overlay:")
780
if tex_slot_alpha.map_mode != 'STENCIL':
781
if brush.use_secondary_overlay:
782
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
784
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
787
sub.prop(brush, "mask_overlay_alpha", text="Alpha")
788
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
728
791
class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
729
792
bl_label = "Tool"
753
816
toolsettings = context.tool_settings.image_paint
754
817
brush = toolsettings.brush
756
layout.prop(brush, "use_airbrush")
758
row.active = brush.use_airbrush
759
row.prop(brush, "rate", slider=True)
761
layout.prop(brush, "use_space")
762
row = layout.row(align=True)
763
row.active = brush.use_space
764
row.prop(brush, "spacing", text="Distance", slider=True)
765
row.prop(brush, "use_pressure_spacing", toggle=True, text="")
767
layout.prop(brush, "use_wrap")
819
col = layout.column()
820
col.prop(toolsettings, "input_samples")
822
col = layout.column()
824
col.label(text="Stroke Method:")
826
col.prop(brush, "stroke_method", text="")
830
col.prop(brush, "use_edge_to_edge", "Edge To Edge")
832
if brush.use_airbrush:
834
col.prop(brush, "rate", text="Rate", slider=True)
838
row = col.row(align=True)
839
row.active = brush.use_space
840
row.prop(brush, "spacing", text="Spacing")
841
row.prop(brush, "use_pressure_spacing", toggle=True, text="")
843
col = layout.column()
846
col.prop(brush, "use_smooth_stroke")
849
sub.active = brush.use_smooth_stroke
850
sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
851
sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
855
row = col.row(align=True)
856
if brush.use_relative_jitter:
857
row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
858
row.prop(brush, "jitter", slider=True)
860
row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
861
row.prop(brush, "jitter_absolute")
862
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
864
col.prop(brush, "use_wrap")
770
867
class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
788
885
row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
888
class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
889
bl_label = "Appearance"
890
bl_options = {'DEFAULT_CLOSED'}
892
def draw(self, context):
895
toolsettings = context.tool_settings.image_paint
896
brush = toolsettings.brush
898
if brush is None: # unlikely but can happen
899
layout.label(text="Brush Unset")
902
col = layout.column()
903
col.prop(toolsettings, "show_brush")
906
col.prop(brush, "cursor_color_add", text="")
907
col.active = toolsettings.show_brush
911
col = layout.column(align=True)
912
col.prop(brush, "use_custom_icon")
913
if brush.use_custom_icon:
914
col.prop(brush, "icon_filepath", text="")
791
917
class IMAGE_UV_sculpt_curve(Panel):
792
918
bl_space_type = 'IMAGE_EDITOR'
793
919
bl_region_type = 'UI'