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:
authorSebastián Barschkis <sebbas@sebbas.org>2021-02-02 19:46:48 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2021-02-02 19:46:48 +0300
commit9ad828dbad94d279521875db47a3472a38cc9b29 (patch)
tree7f7ef01c32299b3259ca7d0737ea9fe558b8bc82 /extern/mantaflow/preprocessed/fileio/mantaio.cpp
parentf8359b5f52d65a3d59ca9d24db67805d2a0ce316 (diff)
Fluid: Updated Mantaflow source files
Includes improvements for the file IO. Namely, more meta data will be written from now on. This change is required to prevent IO issues (e.g. T84649) that arised through the use of sparse grids caching (introduced in 2.92).
Diffstat (limited to 'extern/mantaflow/preprocessed/fileio/mantaio.cpp')
-rw-r--r--extern/mantaflow/preprocessed/fileio/mantaio.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/extern/mantaflow/preprocessed/fileio/mantaio.cpp b/extern/mantaflow/preprocessed/fileio/mantaio.cpp
index fe29890ec11..ff57ab532e6 100644
--- a/extern/mantaflow/preprocessed/fileio/mantaio.cpp
+++ b/extern/mantaflow/preprocessed/fileio/mantaio.cpp
@@ -85,7 +85,8 @@ int save(const string &name,
bool precisionHalf = true,
int precision = PRECISION_HALF,
float clip = 1e-4,
- const Grid<Real> *clipGrid = nullptr)
+ const Grid<Real> *clipGrid = nullptr,
+ const bool meta = false)
{
if (!precisionHalf) {
@@ -105,7 +106,7 @@ int save(const string &name,
return writeGridsVol(name, &objects);
if (ext == ".vdb")
return writeObjectsVDB(
- name, &objects, worldSize, skipDeletedParts, compression, precision, clip, clipGrid);
+ name, &objects, worldSize, skipDeletedParts, compression, precision, clip, clipGrid, meta);
else if (ext == ".npz")
return writeGridsNumpy(name, &objects);
else if (ext == ".txt")
@@ -134,6 +135,7 @@ static PyObject *_W_1(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
int precision = _args.getOpt<int>("precision", 6, PRECISION_HALF, &_lock);
float clip = _args.getOpt<float>("clip", 7, 1e-4, &_lock);
const Grid<Real> *clipGrid = _args.getPtrOpt<Grid<Real>>("clipGrid", 8, nullptr, &_lock);
+ const bool meta = _args.getOpt<bool>("meta", 9, false, &_lock);
_retval = toPy(save(name,
objects,
worldSize,
@@ -142,7 +144,8 @@ static PyObject *_W_1(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
precisionHalf,
precision,
clip,
- clipGrid));
+ clipGrid,
+ meta));
_args.check();
}
pbFinalizePlugin(parent, "save", !noTiming);