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.
This commit is contained in:
2019-11-30 11:46:24 +01:00
parent fcdf4b36c5
commit 5c0f1e1a4e

View File

@@ -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: {