Page MenuHome

Fix T87406: Stroke color when using object color mode
ClosedPublic

Authored by Falk David (filedescriptor) on Apr 12 2021, 4:50 PM.

Details

Summary

The color of the strokes was shifted when using Single Color or
Object Colorin Solid Display Mode. This was originally done so
that it was still possible to differentiate strokes and fills.

The fix allows for a completly flat shading by checking if the
Lighting Mode is set to Flat. If it is, then the colors are not
shifted for the strokes and everything will use the same color.

Diff Detail

Repository
rB Blender
Branch
T87406 (branched from master)
Build Status
Buildable 14011
Build 14011: arc lint + arc unit

Event Timeline

Falk David (filedescriptor) requested review of this revision.Apr 12 2021, 4:50 PM
Falk David (filedescriptor) created this revision.
Falk David (filedescriptor) planned changes to this revision.Apr 12 2021, 5:11 PM
  • Add null check to v3d
source/blender/draw/engines/gpencil/gpencil_draw_data.c
206

Better use the light mode instead of 1, no?

  • Use enum value instead of constant

LGTM (Daniel and Matias also agree with this change)

This revision is now accepted and ready to land.Apr 12 2021, 5:21 PM
Clément Foucault (fclem) requested changes to this revision.Apr 12 2021, 7:28 PM
Clément Foucault (fclem) added inline comments.
source/blender/draw/engines/gpencil/gpencil_draw_data.c
112

Use eV3DShadingLightingMode instead of char.

This revision now requires changes to proceed.Apr 12 2021, 7:28 PM
  • Use eV3DShadingLightingMode
This revision is now accepted and ready to land.Apr 12 2021, 8:02 PM