Commit: 49ae0b5b3c929e91aa9d4292fe9c002c6c9dfe5b
Author: Antonio Vazquez
Date:   Mon Feb 21 19:48:11 2022 +0100
Branches: blender-v3.1-release
https://developer.blender.org/rB49ae0b5b3c929e91aa9d4292fe9c002c6c9dfe5b

Fix T95923: GPencil Array modifier constant offset works even disabled

The problem was when the Object Offset was enabled because the Constant Offset 
flag was not checked and the offset always was added to the transformation 
matrix.

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

M       source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
index 79d4f4dffec..3b52b7d6ee3 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
@@ -120,7 +120,9 @@ static void 
BKE_gpencil_instance_modifier_instance_tfm(Object *ob,
     float obinv[4][4];
 
     unit_m4(mat_offset);
-    add_v3_v3(mat_offset[3], mmd->offset);
+    if (mmd->flag & GP_ARRAY_USE_OFFSET) {
+      add_v3_v3(mat_offset[3], mmd->offset);
+    }
     invert_m4_m4(obinv, ob->obmat);
 
     mul_m4_series(r_offset, mat_offset, obinv, mmd->object->obmat);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to