[Bf-blender-cvs] [7f51a126d03] asset-greasepencil: GPencil: Fix merge error

Antonio Vazquez noreply at git.blender.org
Mon Jul 26 17:25:20 CEST 2021


Commit: 7f51a126d035142f72e2b9d24f4d97e5c07d6c02
Author: Antonio Vazquez
Date:   Mon Jul 26 17:25:13 2021 +0200
Branches: asset-greasepencil
https://developer.blender.org/rB7f51a126d035142f72e2b9d24f4d97e5c07d6c02

GPencil: Fix merge error

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

M	source/blender/editors/gpencil/gpencil_utils.c

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

diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index c3ddd68f0bd..fe9db1e3545 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -3414,6 +3414,13 @@ void ED_gpencil_layer_merge(bGPdata *gpd, bGPDlayer *gpl_src, bGPDlayer *gpl_dst
   LISTBASE_FOREACH (bGPDframe *, gpf_src, &gpl_src->frames) {
     /* Try to find frame in destination layer hash table. */
     bGPDframe *gpf_dst = BLI_ghash_lookup(gh_frames_dst, POINTER_FROM_INT(gpf_src->framenum));
+    /* Apply layer transformation. */
+    LISTBASE_FOREACH (bGPDstroke *, gps_src, &gpf_src->strokes) {
+      for (int p = 0; p < gps_src->totpoints; p++) {
+        bGPDspoint *pt = &gps_src->points[p];
+        mul_v3_m4v3(&pt->x, gpl_src->layer_mat, &pt->x);
+      }
+    }
     /* Add to tail all strokes. */
     if (gpf_dst) {
       BLI_movelisttolist(&gpf_dst->strokes, &gpf_src->strokes);



More information about the Bf-blender-cvs mailing list