Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 81bca5fc911..4c991897bea 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2787,11 +2787,14 @@ void BKE_gpencil_update_layer_transforms(const Depsgraph *depsgraph, Object *ob)
changed = !equals_m4m4(gpl->inverse, cur_mat);
}
- /* Calc local layer transform. */
+ /* Calc local layer transform. Early out if we have non-animated zero transforms. */
bool transformed = ((!is_zero_v3(gpl->location)) || (!is_zero_v3(gpl->rotation)) ||
(!is_one_v3(gpl->scale)));
+ float tmp_mat[4][4];
+ loc_eul_size_to_mat4(tmp_mat, gpl->location, gpl->rotation, gpl->scale);
+ transformed |= !equals_m4m4(gpl->layer_mat, tmp_mat);
if (transformed) {
- loc_eul_size_to_mat4(gpl->layer_mat, gpl->location, gpl->rotation, gpl->scale);
+ copy_m4_m4(gpl->layer_mat, tmp_mat);
}
/* Continue if no transformations are applied to this layer. */