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

Fix loading camera in gltf #2217

Merged
merged 7 commits into from
May 6, 2024
Merged

Conversation

nelianos
Copy link
Contributor

@nelianos nelianos commented May 3, 2024

  • Loading a .gltf/.glb with a camera, will currently not load the camera object to the Trimesh.Scene, and instead contain an empty "dangling" node that was originally the camera node.
  • This is shown with the unit test; previously the loaded camera would have default values different than the original
  • In this PR, we suggest loading the camera into the Scene object if it exists in the gltf, populating the gltf-compatible fields (fov, name, z_near) and the camera_transform

@nelianos nelianos changed the title Fix load cam gltf Fix loading camera in gltf May 6, 2024
@mikedh
Copy link
Owner

mikedh commented May 6, 2024

Thanks for the fix looks great!

@mikedh mikedh changed the base branch from main to feat/np2 May 6, 2024 21:18
@mikedh mikedh merged commit 3c6775b into mikedh:feat/np2 May 6, 2024
9 checks passed
@nelianos nelianos deleted the fix-load-cam-gltf branch May 6, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants