Skip to content

Fix Attribute Error for some assets when loading mesh - #65

Merged
K0lb3 merged 8 commits into
K0lb3:masterfrom
AutumnSun1996:master
Aug 30, 2021
Merged

K0lb3 merged 8 commits into
K0lb3:masterfrom
AutumnSun1996:master

Conversation

@AutumnSun1996

@AutumnSun1996 AutumnSun1996 commented Jul 30, 2021 •

Copy link
Copy Markdown
Contributor

Some Mesh object has no m_StreamData attribute when ProcessData is called. (Like the one I added in test).
Thus, AttrubuteError will be raised and later methods like ReadVertexData will not be called.

This pull requests added try...expect clause inside ProcessData to handle these situations correctly, with a test for Mesh exporting.

@K0lb3

K0lb3 commented Aug 3, 2021

Copy link
Copy Markdown
Owner

Looks like the test fail due to the line ending.
Strangely when I run it locally in any of my Linux distros, the tests pass.

@AutumnSun1996

Copy link
Copy Markdown
Contributor Author

I think it's because the behavior of git on windows.
When commit text file in windows, it will convert CRLF to LF, and convert backwards when checkout.
Git in linux distros will not do this, thus the example file will ends with LF, not CRLF.

Maybe we should remove all '\r' before comparing?

@K0lb3
K0lb3 merged commit bc1361f into K0lb3:master Aug 30, 2021
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