[Bf-blender-cvs] [6eeaecdd67f] master: Cloth: Copy point cache settings when copying cloth modifier
Jacques Lucke
noreply at git.blender.org
Wed Mar 11 13:44:12 CET 2020
Commit: 6eeaecdd67f6b5adbaf85ccf46907e853eade691
Author: Jacques Lucke
Date: Wed Mar 11 13:43:15 2020 +0100
Branches: master
https://developer.blender.org/rB6eeaecdd67f6b5adbaf85ccf46907e853eade691
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
===================================================================
M source/blender/modifiers/intern/MOD_cloth.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list