From 6eeaecdd67f6b5adbaf85ccf46907e853eade691 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 11 Mar 2020 13:43:15 +0100 Subject: Cloth: Copy point cache settings when copying cloth modifier This fixes the issue mentioned in the comment in T74515. Reviewers: mont29 Differential Revision: https://developer.blender.org/D7104 --- source/blender/modifiers/intern/MOD_cloth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 953b1b460c8..63c1b6f1ef0 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -179,7 +179,11 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla } else { tclmd->point_cache = BKE_ptcache_add(&tclmd->ptcaches); - tclmd->point_cache->step = 1; + if (clmd->point_cache != NULL) { + tclmd->point_cache->step = clmd->point_cache->step; + tclmd->point_cache->startframe = clmd->point_cache->startframe; + tclmd->point_cache->endframe = clmd->point_cache->endframe; + } } tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms); -- cgit v1.2.3