Skip to content

Conversation

@erikwski
Copy link

@erikwski erikwski commented Mar 8, 2024

I'm excited to make my first contribution to the project!

This pull request addresses the issue described in the closed issue: #1403, where loading an .obj model could result in the creation of unnecessary "Default" materials or duplicate materials.

I've implemented a solution based on approaches used in my previous projects, which effectively prevents these issues.

Key changes:

  • Don't create a Default material everytime that parse a MTL file
  • The Material id is generated using the node id + "_" + material.id
  • If the material of the same type of node try to be created again, just link the instance to the new component setted in _ownedComponents attributes

Testing:

I've thoroughly tested this solution in my local environment to ensure it resolves the issue without introducing any regressions.
I welcome any feedback or suggestions you may have.

Thank you for your time!

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.

1 participant