Commit: 5c0f1e1a4e88cbbfaf90691e7c642fa053dd5cc7
Author: Antonio Vazquez
Date:   Sat Nov 30 11:46:24 2019 +0100
Branches: master
https://developer.blender.org/rB5c0f1e1a4e88cbbfaf90691e7c642fa053dd5cc7

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.

===================================================================

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

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to