diff --git a/nanovdb/nanovdb/CMakeLists.txt b/nanovdb/nanovdb/CMakeLists.txt index 3ad71b2a2f..dede8fdfbb 100644 --- a/nanovdb/nanovdb/CMakeLists.txt +++ b/nanovdb/nanovdb/CMakeLists.txt @@ -305,10 +305,8 @@ if(NANOVDB_USE_INTRINSICS) target_compile_definitions(nanovdb INTERFACE -DNANOVDB_USE_INTRINSICS) endif() -# NANOVDB_USE_OLD_ACCESSOR is enabled by default in NanoVDB.h; when the option -# is OFF, define the negative macro that suppresses it (a -D cannot un-define). -if(NOT NANOVDB_USE_OLD_ACCESSOR) - target_compile_definitions(nanovdb INTERFACE -DNANOVDB_NO_OLD_ACCESSOR) +if(NANOVDB_USE_OLD_ACCESSOR) + target_compile_definitions(nanovdb INTERFACE -DNANOVDB_USE_OLD_ACCESSOR) endif() if(NANOVDB_USE_OPENVDB) diff --git a/nanovdb/nanovdb/NanoVDB.h b/nanovdb/nanovdb/NanoVDB.h index 61189bd924..b4d16efebd 100644 --- a/nanovdb/nanovdb/NanoVDB.h +++ b/nanovdb/nanovdb/NanoVDB.h @@ -158,11 +158,9 @@ // Use this to switch between std::ofstream or FILE implementations //#define NANOVDB_USE_IOSTREAMS -// Fix the caching bug in the ReadAccessor. Enabled by default; define -// NANOVDB_NO_OLD_ACCESSOR (e.g. via CMake) to turn it off. -#if !defined(NANOVDB_USE_OLD_ACCESSOR) && !defined(NANOVDB_NO_OLD_ACCESSOR) -#define NANOVDB_USE_OLD_ACCESSOR -#endif +// Define NANOVDB_USE_OLD_ACCESSOR before including this header to temporarily +// restore legacy ReadAccessor behavior where value lookups fall back to root +// after a leaf-cache miss. // Uncomment to use (slower) branched version of LeafData::getValue #define NANOVDB_FPN_BRANCHLESS diff --git a/openvdb_cmd/vdb_tool/CMakeLists.txt b/openvdb_cmd/vdb_tool/CMakeLists.txt index 5439f39d72..afc1ad842b 100644 --- a/openvdb_cmd/vdb_tool/CMakeLists.txt +++ b/openvdb_cmd/vdb_tool/CMakeLists.txt @@ -123,17 +123,12 @@ endif() if(OPENVDB_TOOL_USE_EXR) target_compile_definitions(vdb_tool_common INTERFACE "VDB_TOOL_USE_EXR") find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED) - if(OPENVDB_TOOL_USE_EXR) - target_compile_definitions(vdb_tool_common INTERFACE "VDB_TOOL_USE_EXR") + find_package(Imath ${MINIMUM_IMATH_VERSION} CONFIG REQUIRED) - find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED) - find_package(Imath ${MINIMUM_IMATH_VERSION} CONFIG REQUIRED) - - if(TARGET OpenEXR::OpenEXR) - target_link_libraries(vdb_tool_common INTERFACE OpenEXR::OpenEXR Imath::Imath) - else() - target_link_libraries(vdb_tool_common INTERFACE OpenEXR::IlmImf Imath::Imath) - endif() + if(TARGET OpenEXR::OpenEXR) + target_link_libraries(vdb_tool_common INTERFACE OpenEXR::OpenEXR Imath::Imath) + else() + target_link_libraries(vdb_tool_common INTERFACE OpenEXR::IlmImf Imath::Imath) endif() endif()