diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-25 12:41:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-25 12:44:17 +0300 |
commit | 0d4e519b748c33f3f48fa4dcc4aa31ae398ed13a (patch) | |
tree | d0f01efae3279db39e12fb7ce8c83bdd9febfd3a /intern/openvdb | |
parent | 1d8aebaa096fd5afc758a88f99862e74b5d6c7e0 (diff) |
OpenVDB: Fix compilation error against OpenVDB 4
One crucial thing here: OpenVDB shoudl be compiled WITHOUT
OPENVDB_ENABLE_3_ABI_COMPATIBLE flag. This is how OpenVDB's Makefile is
configured and it's not really possible to detect this for a compiled library.
If we ever want to support that option, we need to add extra CMake argument and
use old version 3 API everywhere.
Diffstat (limited to 'intern/openvdb')
-rw-r--r-- | intern/openvdb/intern/openvdb_writer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/openvdb/intern/openvdb_writer.cc b/intern/openvdb/intern/openvdb_writer.cc index 923752909d9..e886c5a76a8 100644 --- a/intern/openvdb/intern/openvdb_writer.cc +++ b/intern/openvdb/intern/openvdb_writer.cc @@ -45,7 +45,11 @@ void OpenVDBWriter::insert(const openvdb::GridBase::Ptr &grid) void OpenVDBWriter::insert(const openvdb::GridBase &grid) { +#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER == 3) m_grids->push_back(grid.copyGrid()); +#else + m_grids->push_back(grid.copyGridWithNewTree()); +#endif } void OpenVDBWriter::insertFloatMeta(const openvdb::Name &name, const float value) |