A parser for wavefront .obj and .mtl files
Project description
wavefront_reader
A parser for wavefront .obj and .mtl files
Free software: MIT license
Documentation: https://wavefront-reader.readthedocs.io.
Features
Reads out wavefront objects to dictionaries with their attributes, including their materials:
from wavefront_reader import read_wavefront, read_objfile, read_mtlfile geoms = read_wavefront('myObjects.obj') cube = geoms['Cube'] cube_vertices = cube['v'] cube_diffuse_material = cube['material']['Kd']
The module has a lot of tests, and handles face indexing by re-indexing the vertex, normal, and texcoord arrays simply by reindexing them into same-length, sequential arrays. While this reduces the memory benefits of the .obj format, it makes it much easier to load the data into OpenGL or reindex the data yourself.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2017-01-18)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for wavefront_reader-0.1.0-py3.5.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | a904b711db6881976effb767a579db2109bef4a3041c1096b4bcea92af3034bb |
|
MD5 | ba8fc053d1ae356b374b89a3f61dc4bc |
|
BLAKE2b-256 | a0b153d4f6349ff7d63d44dbaad4bc69c548801854111a7adeda7f0866a4a160 |
Hashes for wavefront_reader-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efc40d5982d732a695a81add1c5bee6a159cb7ad9e1af58df55de2b632261afa |
|
MD5 | f4be10f1af62e31320801a5bde25fdfc |
|
BLAKE2b-256 | 1a82f833e0a281e1ab39ac57aa96f3b4843b16c6f1f449f3024db3f190f390d6 |
Hashes for wavefront_reader-0.1.0-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1390cfb238d91e359fa02b78316dea02404ab65eed0113627c22eb11e412b8aa |
|
MD5 | 8e968aa214646ad290190a2b591b4938 |
|
BLAKE2b-256 | f296ee136aec329f0bf1875ae8765e48197f2ee08855450a1de4a39371a631eb |