Page MenuHome

Minor interface bug: UV/ImageEditor - Paint Mode - Fill Brush
Closed, ResolvedPublic

Description

System Information
Windows8 QuadroFX5800

Blender Version
Blender 2.78

Short description of error
When using paint mode in UV/ImageEditor by selecting the fill brush and choosing Erase or Add Alpha, the "Fill threshold" bar disappears. Function works well, only the treshold has to be selected on another blending mode.

Exact steps for others to reproduce the error
Open UV/ImageEditor, set to Paint, select the Fill brush, change mode from mix to Erase Alpha.

Related Objects

Event Timeline

Luca Rood (LucaRood) lowered the priority of this task from 90 to 50.Nov 18 2016, 2:15 PM

This fixes the issue:

1diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
2index cca142b..fec6fdd 100644
3--- a/release/scripts/startup/bl_ui/properties_paint_common.py
4+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
5@@ -139,6 +139,9 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal
6 panel.prop_unified_color(row, context, brush, "secondary_color", text="")
7 row.separator()
8 row.operator("paint.brush_colors_flip", icon='FILE_REFRESH', text="")
9+ else:
10+ if brush.image_tool == 'FILL' and not projpaint:
11+ col.prop(brush, "fill_threshold")
12
13 elif brush.image_tool == 'SOFTEN':
14 col = layout.column(align=True)

However, I think there is also an issue with the fill code itself, as it defines the fill area based on the threshold on the RGB channels, even when using the erase/add alpha blend mode. Shouldn't the fill area be defined using the values in the alpha channel itself?

UI fix looks OK to me.

Regarding using alpha channel, am not sure… can think cases where each (based on colors or based on alpha) situation is valid actually.

Also, current way to compute whether color is included in threshold factor looks slightly broken to me? Shouldn’t we multiply threshold by square root of three before using it to compare the squared sum of the three differences? afaict, full black versus full white will give squared distance of three, which is totally unreachable with a threshold in [0, 1] range?