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:
authorJacques Lucke <jacques@blender.org>2020-09-23 15:57:30 +0300
committerJacques Lucke <jacques@blender.org>2020-09-23 15:57:41 +0300
commit4e8d3123f016caba8eb382b25b75b70e4ec86203 (patch)
tree14d0a569b770835865f01a3d3b16fc6c7c155b91 /source/blender/blenkernel/intern/pointcache.c
parentf09fcda8b681656b3f7bf8917ecf654a9d30faef (diff)
Cleanup: remove dead code in point cache and openvdb wrapper
Reviewers: brecht Differential Revision: https://developer.blender.org/D8988
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c91
1 files changed, 3 insertions, 88 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 02b3d60afa5..9018131af86 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -73,10 +73,6 @@
# include "RBI_api.h"
#endif
-#ifdef WITH_OPENVDB
-# include "openvdb_capi.h"
-#endif
-
#ifdef WITH_LZO
# ifdef WITH_SYSTEM_LZO
# include <lzo/lzo1x.h>
@@ -883,9 +879,6 @@ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb)
pid->write_stream = NULL;
pid->read_stream = NULL;
- pid->write_openvdb_stream = NULL;
- pid->read_openvdb_stream = NULL;
-
pid->write_extra_data = NULL;
pid->read_extra_data = NULL;
pid->interpolate_extra_data = NULL;
@@ -929,9 +922,6 @@ void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *p
pid->write_stream = NULL;
pid->read_stream = NULL;
- pid->write_openvdb_stream = NULL;
- pid->read_openvdb_stream = NULL;
-
pid->write_extra_data = NULL;
pid->read_extra_data = NULL;
pid->interpolate_extra_data = NULL;
@@ -985,9 +975,6 @@ void BKE_ptcache_id_from_cloth(PTCacheID *pid, Object *ob, ClothModifierData *cl
pid->read_point = ptcache_cloth_read;
pid->interpolate_point = ptcache_cloth_interpolate;
- pid->write_openvdb_stream = NULL;
- pid->read_openvdb_stream = NULL;
-
pid->write_stream = NULL;
pid->read_stream = NULL;
@@ -1047,9 +1034,6 @@ void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid, Object *ob, DynamicPaintSu
pid->write_stream = ptcache_dynamicpaint_write;
pid->read_stream = ptcache_dynamicpaint_read;
- pid->write_openvdb_stream = NULL;
- pid->read_openvdb_stream = NULL;
-
pid->write_extra_data = NULL;
pid->read_extra_data = NULL;
pid->interpolate_extra_data = NULL;
@@ -1088,9 +1072,6 @@ void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, Object *ob, RigidBodyWorld *r
pid->write_stream = NULL;
pid->read_stream = NULL;
- pid->write_openvdb_stream = NULL;
- pid->read_openvdb_stream = NULL;
-
pid->write_extra_data = NULL;
pid->read_extra_data = NULL;
pid->interpolate_extra_data = NULL;
@@ -1299,8 +1280,6 @@ static const char *ptcache_file_extension(const PTCacheID *pid)
default:
case PTCACHE_FILE_PTCACHE:
return PTCACHE_EXT;
- case PTCACHE_FILE_OPENVDB:
- return ".vdb";
}
}
@@ -2150,36 +2129,6 @@ static int ptcache_read_stream(PTCacheID *pid, int cfra)
return error == 0;
}
-static int ptcache_read_openvdb_stream(PTCacheID *pid, int cfra)
-{
-#ifdef WITH_OPENVDB
- char filename[FILE_MAX * 2];
-
- /* save blend file before using disk pointcache */
- if (!G.relbase_valid && (pid->cache->flag & PTCACHE_EXTERNAL) == 0) {
- return 0;
- }
-
- ptcache_filename(pid, filename, cfra, 1, 1);
-
- if (!BLI_exists(filename)) {
- return 0;
- }
-
- struct OpenVDBReader *reader = OpenVDBReader_create();
- OpenVDBReader_open(reader, filename);
-
- if (!pid->read_openvdb_stream(reader, pid->calldata)) {
- return 0;
- }
-
- return 1;
-#else
- UNUSED_VARS(pid, cfra);
- return 0;
-#endif
-}
-
static int ptcache_read(PTCacheID *pid, int cfra)
{
PTCacheMem *pm = NULL;
@@ -2340,12 +2289,7 @@ int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old)
}
if (cfra1) {
- if (pid->file_type == PTCACHE_FILE_OPENVDB && pid->read_openvdb_stream) {
- if (!ptcache_read_openvdb_stream(pid, cfra1)) {
- return 0;
- }
- }
- else if (pid->read_stream) {
+ if (pid->read_stream) {
if (!ptcache_read_stream(pid, cfra1)) {
return 0;
}
@@ -2356,12 +2300,7 @@ int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old)
}
if (cfra2) {
- if (pid->file_type == PTCACHE_FILE_OPENVDB && pid->read_openvdb_stream) {
- if (!ptcache_read_openvdb_stream(pid, cfra2)) {
- return 0;
- }
- }
- else if (pid->read_stream) {
+ if (pid->read_stream) {
if (!ptcache_read_stream(pid, cfra2)) {
return 0;
}
@@ -2436,28 +2375,7 @@ static int ptcache_write_stream(PTCacheID *pid, int cfra, int totpoint)
return error == 0;
}
-static int ptcache_write_openvdb_stream(PTCacheID *pid, int cfra)
-{
-#ifdef WITH_OPENVDB
- struct OpenVDBWriter *writer = OpenVDBWriter_create();
- char filename[FILE_MAX * 2];
- BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_FRAME, cfra);
-
- ptcache_filename(pid, filename, cfra, 1, 1);
- BLI_make_existing_file(filename);
-
- int error = pid->write_openvdb_stream(writer, pid->calldata);
-
- OpenVDBWriter_write(writer, filename);
- OpenVDBWriter_free(writer);
-
- return error == 0;
-#else
- UNUSED_VARS(pid, cfra);
- return 0;
-#endif
-}
static int ptcache_write(PTCacheID *pid, int cfra, int overwrite)
{
PointCache *cache = pid->cache;
@@ -2598,10 +2516,7 @@ int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra)
return 0;
}
- if (pid->file_type == PTCACHE_FILE_OPENVDB && pid->write_openvdb_stream) {
- ptcache_write_openvdb_stream(pid, cfra);
- }
- else if (pid->write_stream) {
+ if (pid->write_stream) {
ptcache_write_stream(pid, cfra, totpoint);
}
else if (pid->write_point) {