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

Check normal presence before trying to read asMesh normals (backport #654) #657

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Dec 13, 2024

🦟 Bug fix

Fixes there isn't a bug number

Summary

An assimp mesh could contain either

  • the same number of vertices and normals
  • only vertices

Existing code crashes when a mesh contains no normals

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸


This is an automatic backport of pull request #654 done by Mergify.

* In AssimpLoader::Implementation::CreateSubMesh check normal presence before reading
* RecalculateNormals if submesh has no normals

---------

Signed-off-by: Qingyou Zhao <[email protected]>
(cherry picked from commit a50d8d3)
@iche033 iche033 merged commit 7e3a7e8 into gz-common6 Dec 13, 2024
12 checks passed
@iche033 iche033 deleted the mergify/bp/gz-common6/pr-654 branch December 13, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants