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

pyopenvdb file streaming #1764

Open
chrisflesher opened this issue Feb 8, 2024 · 2 comments
Open

pyopenvdb file streaming #1764

chrisflesher opened this issue Feb 8, 2024 · 2 comments

Comments

@chrisflesher
Copy link

chrisflesher commented Feb 8, 2024

Is your feature request related to a problem? Please describe.

Currently pyopenvdb only supports writing to local disk. This prevents writing directly to a destination in some cases (e.g. to cloud storage).

Describe the solution you'd like

The vdb read and write functions accept a file object (or pathlike object) instead of a str.

Describe alternatives you've considered

Currently our workaround is to write to a temporary file on local disk and copy it's contents to the destination.

@chrisflesher
Copy link
Author

chrisflesher commented Feb 9, 2024

Here's a recent example of OpenCV modifying their C++ library to accept pathlike objects, maybe it would be a useful example?
https://github.com/opencv/opencv/pull/24773/files

@danrbailey
Copy link
Contributor

Though this is not currently a priority for the Steering Committee, we agree that this would be a worthwhile improvement. Note that we've recently adopted pybind11 as our python binding library. Feel free to make a PR if it's something you think you might have time to contribute to OpenVDB. Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants