Fix #122503: GPv3: Always Initialize vertex_color_ when drawing

Lack of initialization of `vertex_color_` will cause garbled color to
show up in later interpolated points while drawing in material mode with
curves already have `vertex_color` attribute. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122528
This commit is contained in:
YimingWu
2024-05-31 04:51:55 +02:00
committed by YimingWu
parent eb59a7f574
commit dc69abcb70

View File

@@ -185,6 +185,9 @@ struct PaintOperationExecutor {
std::make_optional(color_base) :
std::nullopt;
}
else {
vertex_color_ = std::make_optional(ColorGeometry4f(0.0f, 0.0f, 0.0f, 0.0f));
}
softness_ = 1.0f - settings_->hardness;
BLI_assert(grease_pencil->has_active_layer());