ratcave / wavefront_reader

A basic Wavefront .obj and .mtl reader module for Python
MIT License
12 stars 10 forks source link

Expand compatibility for more OBJ files #3

Closed 1danielcoelho closed 6 years ago

1danielcoelho commented 6 years ago

Adds changes that allow the library to import OBJ files that were generated by sources other than Blender.

These changes involve removing the '.OBJ' comment check for the first line, as well as handling files that never declare the object name with an 'o' statement, going straight into the vertices. The PR also adds an example of a file generated by the BodyParts3D database that in addition to those problems also has no material file, which the library can handle normally now as well.

In addition, the PR involves some maintenance like removing a duplicate function declaration as well as handling lines with 1 character or no spaces (present on bad_file.obj like '#\n')