Merge branch 'master' into blender2.8
[blender.git] / release / scripts / startup / bl_ui / properties_paint_common.py
index c18aa10e229ff0730d4e65e35fd840e4db9f5a7e..c7bae0d87d645738bf6c96cbe4b5ab6606de8529 100644 (file)
@@ -117,16 +117,14 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal
                 col.label("Gradient Colors")
                 col.template_color_ramp(brush, "gradient", expand=True)
 
-                if brush.image_tool != 'FILL':
+                if brush.image_tool == 'DRAW':
                     col.label("Background Color")
                     row = col.row(align=True)
                     panel.prop_unified_color(row, context, brush, "secondary_color", text="")
-
-                if brush.image_tool == 'DRAW':
                     col.prop(brush, "gradient_stroke_mode", text="Mode")
                     if brush.gradient_stroke_mode in {'SPACING_REPEAT', 'SPACING_CLAMP'}:
                         col.prop(brush, "grad_spacing")
-                elif brush.image_tool == 'FILL':
+                else: # if brush.image_tool == 'FILL':
                     col.prop(brush, "gradient_fill_mode")
             else:
                 row = col.row(align=True)
@@ -137,6 +135,9 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal
                     panel.prop_unified_color(row, context, brush, "secondary_color", text="")
                     row.separator()
                     row.operator("paint.brush_colors_flip", icon='FILE_REFRESH', text="")
+        else:
+            if brush.image_tool == 'FILL' and not projpaint:
+                col.prop(brush, "fill_threshold")
 
     elif brush.image_tool == 'SOFTEN':
         col = layout.column(align=True)