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

Make materials unique #29

Merged
merged 1 commit into from
Mar 17, 2024
Merged

Conversation

AlexKaravaev
Copy link
Contributor

I was having compile errors with some models, because util would duplicate some of materials. I can send the model example if needed. I think materials in general will be always unique in .obj, but correct me if I am wrong.

@AlexKaravaev AlexKaravaev force-pushed the alex/unique-mtls branch 2 times, most recently from 85f689f to 7548018 Compare March 15, 2024 22:23
Convert materials to ordered set instead of list to prevent duplication and .mjcf compile errors
@AlexKaravaev
Copy link
Contributor Author

mypy still complains about Geometry, but have no idea how this can be related to the change

11:23:51 Alexander.Karavaev@unit-2077 obj2mjcf ±|alex/unique-mtls ✗|→
mypy --install-types obj2mjcf
obj2mjcf/cli.py:94: error: "Geometry" has no attribute "vertices"  [attr-defined]
obj2mjcf/cli.py:94: error: "Geometry" has no attribute "faces"  [attr-defined]
obj2mjcf/cli.py:219: error: "Geometry" has no attribute "geometry"  [attr-defined]
Found 3 errors in 1 file (checked 5 source files)

@kevinzakka
Copy link
Owner

@AlexKaravaev Probably a mypy upgrade, will fix after merging. In any case, thank you for the PR!

@kevinzakka kevinzakka merged commit 96bdbc0 into kevinzakka:main Mar 17, 2024
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.

2 participants