diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2021-05-18 23:32:54 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2021-05-18 23:36:51 +0300 |
commit | 8dd43ac23ebef30a136e0f7f430a37bdc556e78c (patch) | |
tree | 8b73919dc8a2bdc4b46405349dad0c79ac9c47e9 /extern/mantaflow/preprocessed/fileio/iovdb.cpp | |
parent | 1b909c726bdb76b8e9847a37339ac023bd26e580 (diff) |
Fluid: Updated Mantaflow source files
Includes update for OpenVDB file IO, i.e. fixes an issue with
compression flag combination that resulted in random segfaults.
Other changes: Cleanup and formatting.
Diffstat (limited to 'extern/mantaflow/preprocessed/fileio/iovdb.cpp')
-rw-r--r-- | extern/mantaflow/preprocessed/fileio/iovdb.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/extern/mantaflow/preprocessed/fileio/iovdb.cpp b/extern/mantaflow/preprocessed/fileio/iovdb.cpp index e615741e0f7..1846ef7ecbb 100644 --- a/extern/mantaflow/preprocessed/fileio/iovdb.cpp +++ b/extern/mantaflow/preprocessed/fileio/iovdb.cpp @@ -29,10 +29,10 @@ #if OPENVDB == 1 # include "openvdb/openvdb.h" -# include <openvdb/points/PointConversion.h> -# include <openvdb/points/PointCount.h> -# include <openvdb/tools/Clip.h> -# include <openvdb/tools/Dense.h> +# include "openvdb/points/PointConversion.h" +# include "openvdb/points/PointCount.h" +# include "openvdb/tools/Clip.h" +# include "openvdb/tools/Dense.h" #endif #define POSITION_NAME "P" @@ -519,7 +519,7 @@ int writeObjectsVDB(const string &filename, } } - // Write only if the is at least one grid, optionally write with compression. + // Write only if there is at least one grid, optionally write with compression. if (gridsVDB.size()) { int vdb_flags = openvdb::io::COMPRESS_ACTIVE_MASK; switch (compression) { @@ -534,7 +534,8 @@ int writeObjectsVDB(const string &filename, } case COMPRESSION_BLOSC: { # if OPENVDB_BLOSC == 1 - vdb_flags |= openvdb::io::COMPRESS_BLOSC; + // Cannot use |= here, causes segfault with blosc 1.5.0 (== recommended version) + vdb_flags = openvdb::io::COMPRESS_BLOSC; # else debMsg("OpenVDB was built without Blosc support, using Zip compression instead", 1); vdb_flags |= openvdb::io::COMPRESS_ZIP; |