diff options
author | Jacques Lucke <jacques@blender.org> | 2020-03-11 15:43:15 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-03-11 15:43:58 +0300 |
commit | 6eeaecdd67f6b5adbaf85ccf46907e853eade691 (patch) | |
tree | 38091705562ecc3ece1c16a5ad7c2713058e3017 /source/blender/modifiers | |
parent | 5cb2861420c733a3fa2d73593d820d9bddc7fd85 (diff) |
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
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_cloth.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |