Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge fix 7.2.5 in master #1828

Merged
merged 9 commits into from
Jan 25, 2024
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@

### Bug fixes

- [usd#1812](https://github.com/Autodesk/arnold-usd/issues/1812) - Improve Material network creation by caching the node entries and the osl code. (fix-7.5.)
- [usd#1808](https://github.com/Autodesk/arnold-usd/issues/1808) - Fix the error "Cannot load _htoa_pygeo library required for volume rendering in Solaris" in Houdini 19.5+.
- [usd#1812](https://github.com/Autodesk/arnold-usd/issues/1812) - Improve Material network creation by caching the node entries and the osl code.

## [7.2.5.1] - 2024-01-18

### Bug fixes

- [usd#1776](https://github.com/Autodesk/arnold-usd/issues/1776) - Fix incorrect PointInstancer instance orientations in the render delegate.
- [usd#1769](https://github.com/Autodesk/arnold-usd/issues/1769) - Fix curve uvs when they are vertex interpolated.

## [7.2.5.0] - 2023-12-13

Expand Down
36 changes: 15 additions & 21 deletions libs/render_delegate/volume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "utils.h"

#include <iostream>
#include <array>

#include <pxr/base/arch/defines.h>
#include <pxr/base/arch/env.h>
Expand Down Expand Up @@ -111,7 +112,7 @@ struct HtoAFnSet {

HtoAFnSet()
{
/// The symbol is stored in _htoa_pygeo.so in python2.7libs, and
/// The symbol is stored in _htoa_pygeo.so in pythonX.Xlibs, and
/// htoa is typically configured using HOUDINI_PATH. We should refine
/// this method in the future.
/// One of the current limitations is that we don't support HtoA
Expand All @@ -122,29 +123,22 @@ struct HtoAFnSet {
if (path == "&") {
return false;
}
const auto dsoPath27 = path + ARCH_PATH_SEP + "python2.7libs" + ARCH_PATH_SEP + "_htoa_pygeo" +
//. HTOA sets this library's extension .so on MacOS.
std::string dsoPath;
void* htoaPygeo = nullptr;
#ifdef ARCH_OS_WINDOWS
".dll"
std::string ext = ".dll";
#else
".so"
std::string ext = ".so";
#endif
;
const auto dsoPath37 = path + ARCH_PATH_SEP + "python3.7libs" + ARCH_PATH_SEP + "_htoa_pygeo" +
#ifdef ARCH_OS_WINDOWS
".dll"
#else
".so"
#endif
;
std::string dsoPath = dsoPath27;
void* htoaPygeo = ArchLibraryOpen(dsoPath27, ARCH_LIBRARY_NOW);
if (htoaPygeo == nullptr) {
dsoPath = dsoPath37;
htoaPygeo = ArchLibraryOpen(dsoPath37, ARCH_LIBRARY_NOW);
if (htoaPygeo == nullptr) {
return false;
}
// TODO: we need to find a solution that doesn't require to add the future python version of houdini
std::array<std::string, 4> pythonVersions = {"2.7", "3.7", "3.9", "3.10"};
for (const auto &pyVer : pythonVersions) {
dsoPath = path + ARCH_PATH_SEP + "python" + pyVer + "libs" + ARCH_PATH_SEP + "_htoa_pygeo" + ext;
htoaPygeo = ArchLibraryOpen(dsoPath, ARCH_LIBRARY_NOW);
if (htoaPygeo) break;
}
if (!htoaPygeo) {
return false;
}
convertPrimVdbToArnold = reinterpret_cast<HtoAConvertPrimVdbToArnold>(GETSYM(htoaPygeo, convertVdbName));
if (convertPrimVdbToArnold == nullptr) {
Expand Down