From 769c57b38a707397ac7fdda15b1deb561194b66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 4 Jul 2018 11:22:15 +0200 Subject: SoftBody: share point cache between CoW copies This is the same approach as 98a0bcd4252e952fa5438e9d1b69b0204f8a8746 applied to soft body simulation. In short, CoW copies share the point cache, and treat it as read-only except when the depsgraph is active. --- source/blender/blenkernel/intern/pointcache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/pointcache.c') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index a8c6091124a..17e90d688a2 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1389,9 +1389,9 @@ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb) pid->ob= ob; pid->calldata= sb; pid->type= PTCACHE_TYPE_SOFTBODY; - pid->cache= sb->pointcache; - pid->cache_ptr= &sb->pointcache; - pid->ptcaches= &sb->ptcaches; + pid->cache= sb->shared->pointcache; + pid->cache_ptr= &sb->shared->pointcache; + pid->ptcaches= &sb->shared->ptcaches; pid->totpoint= pid->totwrite= ptcache_softbody_totpoint; pid->error = ptcache_softbody_error; -- cgit v1.2.3