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.
This commit is contained in:
parent
1d8aebaa09
commit
0d4e519b74
Notes:
blender-bot
2025-02-14 01:31:56 +00:00
Referenced by issue #53683, 2.79a release
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user