diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-02-21 21:48:11 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-02-21 21:48:11 +0300 |
commit | 49ae0b5b3c929e91aa9d4292fe9c002c6c9dfe5b (patch) | |
tree | f5df06b497b5933e190306825e8dacd61b9230c4 /source/blender/gpencil_modifiers/intern | |
parent | be6bcaa8c13dfca98e56d81afd3d19ba226c2699 (diff) |
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.
Diffstat (limited to 'source/blender/gpencil_modifiers/intern')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |