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>2020-06-24 13:00:13 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-06-24 17:07:35 +0300
commit9fe64948abe991d18c1af3a52d81e87c24d39687 (patch)
treebc7363b04130a7538eeb21a7e42e04038e1f3314 /extern/mantaflow/preprocessed/grid4d.cpp
parent6fec2e4db05f6acdfc2b1b0ba365af143201277c (diff)
Fluid: Updated Mantaflow source with latest OpenVDB changes
This updated set of Mantaflow files includes the improved OpenVDB file IO. With this update it is finally possible to store multiple grids per file. It is also possible to save particle systems and particle data to OpenVDB files.
Diffstat (limited to 'extern/mantaflow/preprocessed/grid4d.cpp')
-rw-r--r--extern/mantaflow/preprocessed/grid4d.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/extern/mantaflow/preprocessed/grid4d.cpp b/extern/mantaflow/preprocessed/grid4d.cpp
index 41d69b2d33a..48f80d90b9f 100644
--- a/extern/mantaflow/preprocessed/grid4d.cpp
+++ b/extern/mantaflow/preprocessed/grid4d.cpp
@@ -121,30 +121,32 @@ template<class T> void Grid4d<T>::swap(Grid4d<T> &other)
mData = dswap;
}
-template<class T> void Grid4d<T>::load(string name)
+template<class T> int Grid4d<T>::load(string name)
{
if (name.find_last_of('.') == string::npos)
errMsg("file '" + name + "' does not have an extension");
string ext = name.substr(name.find_last_of('.'));
if (ext == ".uni")
- readGrid4dUni(name, this);
+ return readGrid4dUni(name, this);
else if (ext == ".raw")
- readGrid4dRaw(name, this);
+ return readGrid4dRaw(name, this);
else
errMsg("file '" + name + "' filetype not supported");
+ return 0;
}
-template<class T> void Grid4d<T>::save(string name)
+template<class T> int Grid4d<T>::save(string name)
{
if (name.find_last_of('.') == string::npos)
errMsg("file '" + name + "' does not have an extension");
string ext = name.substr(name.find_last_of('.'));
if (ext == ".uni")
- writeGrid4dUni(name, this);
+ return writeGrid4dUni(name, this);
else if (ext == ".raw")
- writeGrid4dRaw(name, this);
+ return writeGrid4dRaw(name, this);
else
errMsg("file '" + name + "' filetype not supported");
+ return 0;
}
//******************************************************************************