diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-02-06 19:24:09 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-02-06 19:24:09 +0300 |
commit | 1bb702df1e1678b83a7238af2a28ecb73b4fb069 (patch) | |
tree | ed21c39b89ffadf7b6dd82ba33932690d04e1e4c /intern | |
parent | e7d71ce9cf1eb8ea73d5d77527fc65e7bd6f5d4d (diff) |
OpenVDB: Fix IOError in try catch statement
Broader exception handling for OpenVDB IO errors.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index 11b8fb820d6..798ad9c2854 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -2174,6 +2174,7 @@ void MANTA::exportLiquidScript(FluidModifierData *mmd) bool floater = mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_FOAM; bool tracer = mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_TRACER; bool obstacle = mmd->domain->active_fields & FLUID_DOMAIN_ACTIVE_OBSTACLE; + bool fractions = mmd->domain->flags & FLUID_DOMAIN_USE_FRACTIONS; bool guiding = mmd->domain->active_fields & FLUID_DOMAIN_ACTIVE_GUIDE; bool invel = mmd->domain->active_fields & FLUID_DOMAIN_ACTIVE_INVEL; @@ -2210,6 +2211,8 @@ void MANTA::exportLiquidScript(FluidModifierData *mmd) manta_script += fluid_alloc_guiding; if (obstacle) manta_script += fluid_alloc_obstacle; + if (fractions) + manta_script += fluid_alloc_fractions; if (invel) manta_script += fluid_alloc_invel; @@ -2891,7 +2894,7 @@ int MANTA::updateGridFromVDB(const char *filename, float *grid) try { file.open(); } - catch (const openvdb::v5_1::IoError) { + catch (const openvdb::IoError) { std::cout << "MANTA::updateGridFromVDB(): IOError, invalid OpenVDB file: " << filename << std::endl; return 0; |