Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 7aa01de71d0..59e2c3f6d72 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1630,7 +1630,7 @@ void BKE_ptcache_free_list(ListBase *ptcaches)
BLI_freelistN(ptcaches);
}
-PointCache *BKE_ptcache_copy(PointCache *cache)
+static PointCache *ptcache_copy(PointCache *cache)
{
PointCache *ncache;
@@ -1645,7 +1645,18 @@ PointCache *BKE_ptcache_copy(PointCache *cache)
return ncache;
}
+/* returns first point cache */
+PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old)
+{
+ PointCache *cache = ptcaches_old->first;
+
+ ptcaches_new->first = ptcaches_new->last = NULL;
+ for(; cache; cache=cache->next)
+ BLI_addtail(ptcaches_new, ptcache_copy(cache));
+
+ return ptcaches_new->first;
+}
/* Baking */