Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-11-26 20:12:39 +0300
committerAntonioya <blendergit@gmail.com>2018-11-26 20:12:39 +0300
commit99f7934e19ddf6796e866d2ddc0c3882ed8fcc2b (patch)
tree45e39dc690fd17f989bceac35e8ecf794417af34 /source/blender/draw/engines/gpencil/gpencil_cache_utils.c
parentc0816cd03b42399e75a285d5e5dd1319e5054f17 (diff)
GP: New Blend Layers functionality
Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers. Also a new Simplify option has been added to disable blend layers.
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_cache_utils.c')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c8
1 files changed, 6 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 15ac3f37add..5478c4a60b9 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -83,8 +83,12 @@ tGPencilObjectCache *gpencil_object_cache_add(
cache_elem->pixfactor = cache_elem->gpd->pixfactor;
cache_elem->shader_fx = ob_orig->shader_fx;
- cache_elem->init_grp = NULL;
- cache_elem->end_grp = NULL;
+ /* shgrp array */
+ cache_elem->tot_layers = 0;
+ int totgpl = BLI_listbase_count(&cache_elem->gpd->layers);
+ if (totgpl > 0) {
+ cache_elem->shgrp_array = MEM_callocN(sizeof(tGPencilObjectCache_shgrp) * totgpl, __func__);
+ }
/* calculate zdepth from point of view */
float zdepth = 0.0;