[Bf-blender-cvs] [4dd32f94aa3] master: GPencil: Invert color offsetting for Single and Object mode

Antonio Vazquez noreply at git.blender.org
Wed Apr 14 19:00:29 CEST 2021


Commit: 4dd32f94aa3edb56130f15019b9b2724c3ba8a28
Author: Antonio Vazquez
Date:   Wed Apr 14 19:00:18 2021 +0200
Branches: master
https://developer.blender.org/rB4dd32f94aa3edb56130f15019b9b2724c3ba8a28

GPencil: Invert color offsetting for Single and Object mode

Now, instead to offset the stroke color to make it visible over fill, the stroke keeps the original color and the fill is offset.

Related to the issue in T87406.

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_draw_data.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.c b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
index 99946b27dcd..526f553329e 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_data.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
@@ -151,7 +151,7 @@ static MaterialGPencilStyle *gpencil_viewport_material_overrides(
       gp_style->fill_rgba[3] = 1.0f;
       copy_v4_v4(gp_style->stroke_rgba, gp_style->fill_rgba);
       if (lighting_mode != V3D_LIGHTING_FLAT) {
-        gpencil_shade_color(gp_style->stroke_rgba);
+        gpencil_shade_color(gp_style->fill_rgba);
       }
       break;
     case V3D_SHADING_OBJECT_COLOR:
@@ -161,7 +161,7 @@ static MaterialGPencilStyle *gpencil_viewport_material_overrides(
       copy_v4_v4(gp_style->fill_rgba, ob->color);
       copy_v4_v4(gp_style->stroke_rgba, ob->color);
       if (lighting_mode != V3D_LIGHTING_FLAT) {
-        gpencil_shade_color(gp_style->stroke_rgba);
+        gpencil_shade_color(gp_style->fill_rgba);
       }
       break;
     case V3D_SHADING_VERTEX_COLOR:



More information about the Bf-blender-cvs mailing list