feat: add model thumbnail rendering
Summary
This pull request adds 3D model thumbnail support for .obj, .gltf, .stl, .glb, and .fbx formats, using Open3D 0.19.0 for rendering. It supports textures and can color texture-less models. In the future, I plan to add a setting for users to choose their default model color.
This supersedes https://github.com/TagStudioDev/TagStudio/pull/693
This closes https://github.com/TagStudioDev/TagStudio/issues/351
Remaining Issues
The first issue with the pull request is that Open3D's OffscreenRenderer requires a dedicated thread, and it crashes if no thread adopts the renderer. I'm unsure how to integrate this with QThreads, so as a workaround, I set daemon=True for the rendering thread to prevent the software from hanging on exit. While this stops the hanging issue, it feels like a hacky solution.
The second issue is that sometimes on the first run the program seg faults, but on second run has no issues
Preview
Tasks Completed
- Platforms Tested:
- [ ] Windows x86
- [ ] Windows ARM
- [ ] macOS x86
- [ ] macOS ARM
- [X] Linux x86
- [ ] Linux ARM
- Tested For:
- [x] Basic functionality
- [ ] PyInstaller executable
Looks like the offscreenrenderer that comes with open3d only works on linux. So I need to try a different way to render off screen. I think there are other ways, they will just take more time. Back to the drawing board
Closing, see discussion post #1231