Commit: 319df22970c2dd64a4a566982bb257d9b80ab5a3
Author: Antonio Vazquez
Date: Fri Nov 29 22:51:32 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB319df22970c2dd64a4a566982bb257d9b80ab5a3
GPencil: Fix error when parent a layer to Bone and don't scale thickness
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_utils.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index f8cf0859b2a..8f4fa87b9e0 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1893,7 +1893,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) {
@@ -1935,6 +1934,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: {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs