diff options
author | Antonioya <blendergit@gmail.com> | 2019-03-02 15:58:59 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-03-02 15:59:18 +0300 |
commit | cd9c1c10e88c3fd1a028cdf2a711b4df234fbf17 (patch) | |
tree | 76a0e2cd49b639e16dc93d15c9ffb07f8b27dded /source/blender/draw/engines/gpencil/gpencil_cache_utils.c | |
parent | 10d41e48b8abd6f60f3dc379a8a0b5b5eb4889b4 (diff) |
GPencil: Fix Display Textures in Solid mode
There was a bug when selected Solid mode with Material or Texture mode. The textures were not visible.
Now, the mode is passed to shaders to decide if use the solid color or the result texture color. The mode is passed using an array with shading type and mode.
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_cache_utils.c')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_cache_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index f57ec5e974f..cf3025302ef 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -85,11 +85,11 @@ tGPencilObjectCache *gpencil_object_cache_add( /* save wire mode (object mode is always primary option) */ if (ob->dt == OB_WIRE) { - cache_elem->shading_type = (int)OB_WIRE; + cache_elem->shading_type[0] = (int)OB_WIRE; } else { if (v3d) { - cache_elem->shading_type = (int)v3d->shading.type; + cache_elem->shading_type[0] = (int)v3d->shading.type; } } |