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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-11-13 19:51:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-14 16:08:39 +0300
commit39cd872acbcc913f9df4f6620680a2e7f89c5098 (patch)
treede85e6e2c3790e41798a5a05e29bd0c5056923e3 /source/blender/blenkernel/intern/pointcache.c
parentec2fea733bda8c83ef1e7585ff5d99ce7407fb25 (diff)
Add function to query whether object has any point cache
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 60defc575f4..0dc192db8f0 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1829,6 +1829,18 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup
scene, ob, duplis, ptcache_ids_from_object_cb, &data);
}
+static bool ptcache_object_has_cb(PTCacheID *UNUSED(pid),
+ void *UNUSED(userdata))
+{
+ return false;
+}
+
+bool BKE_ptcache_object_has(struct Scene *scene, struct Object *ob, int duplis)
+{
+ return !foreach_object_ptcache(
+ scene, ob, duplis, ptcache_object_has_cb, NULL);
+}
+
/* File handling */
static const char *ptcache_file_extension(const PTCacheID *pid)