[Bf-blender-cvs] [7d56c425f8e] master: GPencil: Don'r Replace color if vertex color is empty
Antonio Vazquez
noreply at git.blender.org
Fri Mar 13 21:54:59 CET 2020
Commit: 7d56c425f8e64346eac6e78ed49d5c5ce2fe1025
Author: Antonio Vazquez
Date: Fri Mar 13 21:54:42 2020 +0100
Branches: master
https://developer.blender.org/rB7d56c425f8e64346eac6e78ed49d5c5ce2fe1025
GPencil: Don'r Replace color if vertex color is empty
The replace tools only must work over previously vertex painted.
===================================================================
M source/blender/editors/gpencil/gpencil_vertex_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c
index 9cdea22d45e..45dc22bafba 100644
--- a/source/blender/editors/gpencil/gpencil_vertex_paint.c
+++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c
@@ -484,19 +484,15 @@ static bool brush_replace_apply(tGP_BrushVertexpaintData *gso, bGPDstroke *gps,
/* Apply color to Stroke point. */
if (GPENCIL_TINT_VERTEX_COLOR_STROKE(brush)) {
- copy_v3_v3(pt->vert_color, gso->linear_color);
- /* If not mix color, full replace. */
- if (pt->vert_color[3] == 0.0f) {
- pt->vert_color[3] = 1.0f;
+ if (pt->vert_color[3] > 0.0f) {
+ copy_v3_v3(pt->vert_color, gso->linear_color);
}
}
/* Apply color to Fill area (all with same color and factor). */
if (GPENCIL_TINT_VERTEX_COLOR_FILL(brush)) {
- copy_v3_v3(gps->vert_color_fill, gso->linear_color);
- /* If not mix color, full replace. */
- if (gps->vert_color_fill[3] == 0.0f) {
- gps->vert_color_fill[3] = 1.0f;
+ if (gps->vert_color_fill[3] > 0.0f) {
+ copy_v3_v3(gps->vert_color_fill, gso->linear_color);
}
}
More information about the Bf-blender-cvs
mailing list