diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-11-30 13:46:24 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-11-30 13:46:24 +0300 |
commit | 5c0f1e1a4e88cbbfaf90691e7c642fa053dd5cc7 (patch) | |
tree | 337850919aeb9a452168f958a56fe4a30629d42d | |
parent | fcdf4b36c53c0f2fec8f1296b48c1a003bddf5b0 (diff) |
GPencil: Fix unreported thickness does not scale when layer is parented
The thickness was using the object scale always, but when the layer is parented, must use the parented object scale.
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 48912a914dc..cd96b21280f 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -1816,7 +1816,6 @@ static void gpencil_shgroups_create(GPENCIL_e_data *e_data, for (int i = 0; i < cache->grp_used; i++) { elm = &cache->grp_cache[i]; array_elm = &cache_ob->shgrp_array[idx]; - const float scale = cache_ob->scale; /* Limit stencil id */ if (stencil_id > 255) { @@ -1858,6 +1857,8 @@ static void gpencil_shgroups_create(GPENCIL_e_data *e_data, break; } + const float scale = (!cache_ob->is_dup_ob) ? mat4_to_scale(gpf->runtime.parent_obmat) : + cache_ob->scale; float(*obmat)[4] = (!cache_ob->is_dup_ob) ? gpf->runtime.parent_obmat : cache_ob->obmat; switch (elm->type) { case eGpencilBatchGroupType_Stroke: { |