[Bf-blender-cvs] [c20b99b70c8] master: Vertex Paint: Fix brush color space
Joseph Eagar
noreply at git.blender.org
Mon Apr 25 22:25:03 CEST 2022
Commit: c20b99b70c84f089277fa1615efea733b338cdd0
Author: Joseph Eagar
Date: Mon Apr 25 13:24:22 2022 -0700
Branches: master
https://developer.blender.org/rBc20b99b70c84f089277fa1615efea733b338cdd0
Vertex Paint: Fix brush color space
The brush color wasn't being converted
to scene linear space properly.
===================================================================
M source/blender/editors/sculpt_paint/paint_vertex.cc
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index 1d78f03fe6f..1ae9f7a8afb 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -332,6 +332,8 @@ static Color vpaint_get_current_col(Scene *scene, VPaint *vp, bool secondary)
const float *brush_color = secondary ? BKE_brush_secondary_color_get(scene, brush) :
BKE_brush_color_get(scene, brush);
copy_v3_v3(color, brush_color);
+ IMB_colormanagement_srgb_to_scene_linear_v3(color);
+
color[3] = 1.0f; /* alpha isn't used, could even be removed to speedup paint a little */
return fromFloat<Color>(ColorPaint4f(color));
More information about the Bf-blender-cvs
mailing list