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
This commit is contained in:
Jacques Lucke 2020-03-11 13:43:15 +01:00
parent 5cb2861420
commit 6eeaecdd67
Notes: blender-bot 2023-02-14 05:51:15 +01:00
Referenced by issue #71604, Cloth Point Cache settings don't copy after object dupication
1 changed files with 5 additions and 1 deletions

View File

@ -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);