Experimental fork of tinyobjloader Python module
Project description
tinyobjloader, Wavefront .obj loader
tinyobjloader
is a python wrapper for C++ wavefront .obj loader.
tinyobjloader
is rather fast and feature rich than other pure python version of .obj loader.
Quick tutorial
import sys
import tinyobjloader
# Create reader.
reader = tinyobjloader.ObjReader()
filename = "cornellbox.obj"
# Load .obj(and .mtl) using default configuration
ret = reader.ParseFromFile(filename)
if ret == False:
print("Warn:", reader.Warning())
pint("Err:", reader.Error())
print("Failed to load : ", filename)
sys.exit(-1)
if reader.Warning():
print("Warn:", reader.Warning())
attrib = reader.GetAttrib()
print("attrib.vertices = ", len(attrib.vertices))
print("attrib.normals = ", len(attrib.normals))
print("attrib.texcoords = ", len(attrib.texcoords))
materials = reader.GetMaterials()
print("Num materials: ", len(materials))
for m in materials:
print(m.name)
print(m.diffuse)
shapes = reader.GetShapes()
print("Num shapes: ", len(shapes))
for shape in shapes:
print(shape.name)
print("num_indices = {}".format(len(shape.mesh.indices)))
More detailed usage
Please take a look at python/sample.py
file in tinyobjloader git repo.
https://github.com/syoyo/tinyobjloader/blob/master/python/sample.py
License
MIT license.
TODO
- Writer saver
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tinymetabobjloader-0.1.1.tar.gz
(22.9 kB
view hashes)
Built Distributions
Close
Hashes for tinymetabobjloader-0.1.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb29743aa4a14db54cf664f9d60a49bf024512023ee0edd214164bd838eb6f44 |
|
MD5 | d139418b954bd9bed45a83603be18119 |
|
BLAKE2b-256 | d1e5acc7ca76625ca84fbbc9eb2a722aabea530bb87042e7d87a5822f75b2de4 |
Close
Hashes for tinymetabobjloader-0.1.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 023cfcf6c45837d075604bfaa400f414bd62de402a4c932c3cb143c4d1d9a6bc |
|
MD5 | 40b160affc0bbd000295be6c0ee604b2 |
|
BLAKE2b-256 | 89dc6f8ae365a5e1bad861fab79649a608bdfad602eada7407a6dd9943c9df9e |
Close
Hashes for tinymetabobjloader-0.1.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf768503d2ada59d83dcc88ae4f0f4508535754e674192dccecd5c5aa4d9aec |
|
MD5 | 07131c1aa741bada304211af81ece26f |
|
BLAKE2b-256 | 1bdc980f7071903c6a2b5823c49b1d5647203f35c0e02035d6eee8721592a8fb |
Close
Hashes for tinymetabobjloader-0.1.1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3d5265e619d505d76031689f96a57869fd0dd4b66332446999f2abf7e9ce8e8 |
|
MD5 | c5a15ebd515beb3a4a8d85d72ec01d18 |
|
BLAKE2b-256 | f79c4734bc32125f349a1a02a61ef3b488d8ef2da5a07f5c727f11ae3bfe80bc |
Close
Hashes for tinymetabobjloader-0.1.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5678c2bffff7b35d4b53eb9633b2f286c51e2c82d38248ccc5ebb00439bd90ac |
|
MD5 | 0a031f9837a38215ba8eb03768e6ae64 |
|
BLAKE2b-256 | c68513971cc08f1798daba439e75c3a18fbc0117dc50045d5d69a2e1e91b7e47 |
Close
Hashes for tinymetabobjloader-0.1.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0522fbaf8d54e9fa51c82ec055f8cca1bf7ff65a3ac5c39c25d8d81e87b00752 |
|
MD5 | d7d638d979578ed8b563c51965e1246b |
|
BLAKE2b-256 | 820a67b615da143de0c622e54adb63964d9d080699e44fc52e5a25505561f136 |
Close
Hashes for tinymetabobjloader-0.1.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f32cfec269222f485da2a2cfbc95c64b096888f9e5fcf21da08da8483286dff |
|
MD5 | 6e14cc13227697c05c020b6af01bc9e4 |
|
BLAKE2b-256 | f4022aae966e6ed5062bb3733b0c1ab040c9edb6280f7971845bda43076629ed |
Close
Hashes for tinymetabobjloader-0.1.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fe489f4a0590a5f9e7860601217176a81c0a6910edb76be669f7241bc6a0e22 |
|
MD5 | be73d67bc0100afb3c85bfa551bfdcea |
|
BLAKE2b-256 | 3e6e1fcfb98b50187d534840278d31a812f1fc2f1fdc21a08a1dbc1d277a6455 |
Close
Hashes for tinymetabobjloader-0.1.1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b41beb932649422c3e43530efb6e11e062ae44c3a3a27a4d7759d55bbd3cf701 |
|
MD5 | dfb20ca7f42273baf661ef16f52ce8e8 |
|
BLAKE2b-256 | 5ee7505d342e73d57f84c08c8f04492d1d0a28fdc21f7f82f740af7ca64ebf7d |
Close
Hashes for tinymetabobjloader-0.1.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34835668fd7f1bcd257f6e3cd74bbed37afa9f4b80d7265ae65ebee4fb37d911 |
|
MD5 | 1e50d946aa894d4e75ed662f18dafcb1 |
|
BLAKE2b-256 | 988601badc9eb9f630c6ff34e5451c6a85d4c6ee34237951091067a85a157d93 |
Close
Hashes for tinymetabobjloader-0.1.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00d5326a94eb74b5e53f110711b4fbd347c9f90221657b8feeecb3b2473de4ca |
|
MD5 | db40494f3659fb363b05ae1fa3d31ae6 |
|
BLAKE2b-256 | 176baaaba2cbe8c3d659529b0db77e5551cdc9bbc1c13e25c484c50b691161f3 |
Close
Hashes for tinymetabobjloader-0.1.1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5750503757a95c357105372c1efb22aaaa0cfe8df688cc812eef8b718870d9e2 |
|
MD5 | 6a999b5a5f694302de3dd1e450c5f216 |
|
BLAKE2b-256 | 8636786505cb59ada646cfce88f77f29f859dde9697cedaffc951e53c6611ef2 |
Close
Hashes for tinymetabobjloader-0.1.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cdb6003050a7c99de22e9973891463d18dfb36ecb3246d01a2dab2b89d251a5 |
|
MD5 | a866e2652034e39a461857d6ba04f801 |
|
BLAKE2b-256 | 456f157fd7c7a1f90a7ff4d1aa7c217957d5adb8b0f4efb06e517c6fc5e3ecff |
Close
Hashes for tinymetabobjloader-0.1.1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9fdda0569b381afac825ff2166a3c36504b9d63b9ee1b38432503b6c87b4057 |
|
MD5 | 620c9bc15fb2b989c91ff6fc52922710 |
|
BLAKE2b-256 | d18f54ea17acb3b1ab40be818a571107b3f12f744b56d6f1ea611182d2a73ffb |
Close
Hashes for tinymetabobjloader-0.1.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b14966df29835feeb64dd6bc42c7148e7b67b6e5ba41c7f68ffd02647a79030f |
|
MD5 | 4dd89d7313275a4445fa43e82cebfca7 |
|
BLAKE2b-256 | d6c8afd583d977cbcc71bfd28e66e309d9241b7d0a882f8c5092cd17c7e1b254 |
Close
Hashes for tinymetabobjloader-0.1.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ddbfe0c5cdfbfede797354fc3cdd790c3ce15e69b91bab58e88f5fb7cafc5a |
|
MD5 | a364fcf529402d1c56514dab275dbcdd |
|
BLAKE2b-256 | 2a5bf6bdd75a0c09d7d23bc9a537e50a08dbb887453c263a208215c6900ac2a3 |
Close
Hashes for tinymetabobjloader-0.1.1-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b67e272e431718fc6d7f0039eea2112aeca2490769ff6923061a72b59f71dc6a |
|
MD5 | 25ca2c042284ea7a68a7406f6f241af9 |
|
BLAKE2b-256 | 29a40b0d99ea3012371ae34a80d5e6822d2f87c55fe9a05dc9f2e0384bb98bbe |
Close
Hashes for tinymetabobjloader-0.1.1-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0824e4b308b5bf2997c46c9058451a11f6686566b8ae3f34b69f25f9441111d6 |
|
MD5 | 59ec3f6b8cf257b2264ac2a021315a75 |
|
BLAKE2b-256 | 7583708873ca01271bbbddc1d380b2483c57b9a642ab0489656e261f364d2132 |
Close
Hashes for tinymetabobjloader-0.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f5c4094d9597342169130e918553c6551d24d272b8012ede61b6dae6948e520 |
|
MD5 | e7fb87b66f3ee38c8e5ec31b4cb39ea4 |
|
BLAKE2b-256 | 61ecf6885210893f1064b3a391ac57203402cff546b23e5ca6fd430dd836d50c |
Close
Hashes for tinymetabobjloader-0.1.1-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a50363a1aea4e56767dfabf8cb8e4b7839a81200d2a07b4d32a18db56a97cd |
|
MD5 | f4b68de4bb3bc7988ee8e50f4b87052f |
|
BLAKE2b-256 | 0ec1a4cf5055fd46a1cbdecf51b40b763ac1b1ce49352d26f062b6b3bd16939f |
Close
Hashes for tinymetabobjloader-0.1.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfe4d15339dc1e2a86095f8a1441b7aa89fcf30bd6dcd91c1a1f9b1e33b3137a |
|
MD5 | f24a028d5da85f589142e9bb7d860ea1 |
|
BLAKE2b-256 | cd6a149300e7f5296ca25156964af836f6f88270bf7bc803d050a362a3d8faf5 |
Close
Hashes for tinymetabobjloader-0.1.1-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe0ddf3c8c5e556d63f8340c5bbb09ca7df446405f20d1e6326fbd9e13cb0d3b |
|
MD5 | 32a1df11c9890264ae64349a0d42edaf |
|
BLAKE2b-256 | d75cfe12d33e03b2df58bf3880de2941df382a863d42e1a3be3d9de9b8ba486b |
Close
Hashes for tinymetabobjloader-0.1.1-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a8f71c784cade9acbf56df0bfde348f63f2494b3e1718854998c4e12b82efe7 |
|
MD5 | 2c66e84924dd784d663cbecda0de688c |
|
BLAKE2b-256 | b57497fb750f8be94050a4c8da14d8dad9ab929a5b8f7766ed52116251fa4484 |