Tiny but powerful Wavefront OBJ loader
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.
Install
You can install tinyobjloader
with pip.
$ pip install tinyobjloader
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
How to build
Using cibuildwheel
is an recommended way to build a python module.
See $tinyobjloader/azure-pipelines.yml for details.
Developer build
Edit setup.py
and uncomment Developer option
lines
Assume pip is installed.
$ pip install pybind11
$ python setup.py build
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
tinyobjloader-2.0.0rc8.tar.gz
(26.7 kB
view hashes)
Built Distributions
Close
Hashes for tinyobjloader-2.0.0rc8-pp37-pypy37_pp73-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4cc3d03d03045ba22c0f1a94a23389e154c2525bbf49150a93b1d78452352d6 |
|
MD5 | b0981a423b9f6d1e32e0946813bd2a04 |
|
BLAKE2b-256 | 20d4294a272d8530b3600a3755f3665dadb93bd58152ef446d0007c940a2cbd2 |
Close
Hashes for tinyobjloader-2.0.0rc8-pp37-pypy37_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c0af20784b20a86b3006d2e6f6c6e0a533b71e01ab1abf01ab1ca3600399dc4 |
|
MD5 | 0fff7596ff56948ff07aa85c7c590fd1 |
|
BLAKE2b-256 | 44e02e6e949f89a75f234c37912b3053965f2b279f8ef40b93bc576e2c7083e0 |
Close
Hashes for tinyobjloader-2.0.0rc8-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1b55430cba31b9e2055293e7e9c62b4ea30f00f87633dab96839f3f7ccb81fb |
|
MD5 | 6dc3159c498556b1a4057ecc019e3d66 |
|
BLAKE2b-256 | 993a8315bbc0521edcfa8b20ef955c0cfa99b627bce4356fbbfc47fc43036d2f |
Close
Hashes for tinyobjloader-2.0.0rc8-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90b2f84e1f9a670ea7a6a0d2fc332bec49ee9cbce44752e7e70aade72d4ba6e6 |
|
MD5 | bdbab892b65862a1aa40a5b3089d293b |
|
BLAKE2b-256 | caa33c9aa72fd57722d530e821959db537144504d52fff0a02b078842cae214a |
Close
Hashes for tinyobjloader-2.0.0rc8-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dabde27962b9a98e7835f9de6eff789e75faf82a7807d75883054c4f0d2b330 |
|
MD5 | 782cec04ea270e9588b4a6bd81b86b0a |
|
BLAKE2b-256 | 46bb41bc485e4a9a3b9c2136865687059651b5e27edefefcbd41cca6ed08c05f |
Close
Hashes for tinyobjloader-2.0.0rc8-pp27-pypy_73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c439389db5865d88f6779d6dc34b88502536cd0286b00a8524a7c557f7512504 |
|
MD5 | f2acc5e0ad5450c3f67762f8c2f46616 |
|
BLAKE2b-256 | 31f41efe1cf71269b3e3902e5c2d7fe6294670f05c29d175c45f723212f7c0e8 |
Close
Hashes for tinyobjloader-2.0.0rc8-pp27-pypy_73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e70599432bc7ec4c25926f625129596d5e2b2c58e50601bda9747b95beed4b4 |
|
MD5 | 12a7b2bd336c1373f8868c8be7dbe4f1 |
|
BLAKE2b-256 | 006cb0fb2e116be34308181900d37a89bb6b74f392e494b6d8db12c854bbc9da |
Close
Hashes for tinyobjloader-2.0.0rc8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3690b6e8743cc175de64aa05f0d9310ee4d56b84e8fa764f2d34bd0f804c3292 |
|
MD5 | bff381bf3d57d1540d1668cdc356994f |
|
BLAKE2b-256 | 2918075ef0d56ddb7dd333ccf8493b7bbee1c00e7c96e5292a725ba32e1eecf0 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff04ecbba2240aa616852ee9613745a5a209e24578db24b3fecbb5c601a17f81 |
|
MD5 | d60e44d226bf8ecbd83d842b35a96b62 |
|
BLAKE2b-256 | 92e5092413b0d51f19ef36f95edc685f90cbb1cd1e45d1f8247e783505167a57 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03fb6a022be4f23450277c8f3bc3fed473a40472dd9cd5420b3a48cc5034d42c |
|
MD5 | 5526c0f01cb5eac1ab726d81abdc0265 |
|
BLAKE2b-256 | 83611d32586f75b32694ed4b07970a9238086f8602b3cbf70d326c88b7488617 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f71d1d5f5c083e837fef920ec353a511d9e9d4d061c7802c2fa84553481d5d92 |
|
MD5 | 6bb420c607f82dd4c0b48a43b2b6f983 |
|
BLAKE2b-256 | 73513ee48f0ba61e0dbcc7116f7a3694f15441184bb91a7343ce4c5ed0d9ed05 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2705778673715b7b2aa56123d561cca07afab2902a83e7a8f85bbe09b2ade9ef |
|
MD5 | 13fc9945d7ab2ce87b051d5f2798ffd7 |
|
BLAKE2b-256 | d4d9f70ec6567e73438ccc6054b9333af934a8ec856df369806f984768c28a9f |
Close
Hashes for tinyobjloader-2.0.0rc8-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abc55bf771c33af8ab2ba29654b90fa9e9cde9b20c69efb145f4a458a1076b37 |
|
MD5 | 674ed36505d5db1f3e21c79d14ebd6ec |
|
BLAKE2b-256 | 1ab7392b25c1c2e7dce9fa048b07e161e64737b2ef8ea32974eb6155e66cf7af |
Close
Hashes for tinyobjloader-2.0.0rc8-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e31529edc583a418752af76fcf61d286f59924a1f59e59b1db519f9798ec2082 |
|
MD5 | bd063e7def28d78accb854b6bdfe7ec1 |
|
BLAKE2b-256 | 9854f47c50e91abd963a5d966f2016b729d19924ddc965cc4ddb63f35682e348 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cb53226745256462ba985a13057c7ba4b0c39cf24f2137b4523056507d51960 |
|
MD5 | e55c1f5f8fdbab863263474d5bf20c1b |
|
BLAKE2b-256 | 4658a4ee0d3433889fa8ed26145b9ed985e05ecd9331ef5806b2b4b68e97aace |
Close
Hashes for tinyobjloader-2.0.0rc8-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 683ed2005199c7462b46b9be2ca37b04b791c82d672b4e799171549cbe0818ac |
|
MD5 | 247e69aae5768bd56d608286ebcf8f76 |
|
BLAKE2b-256 | 4e3fd177e87f287e0946b7548bb9f46032030d7d38fe823dd8605eb4d23cdc4b |
Close
Hashes for tinyobjloader-2.0.0rc8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea96832521c8ed5aa72e2637e3583602d1a18c6dda99ac87c612107baa12f118 |
|
MD5 | 64bf84af636b975cb85d79c952b276eb |
|
BLAKE2b-256 | c23d5c51a5f3055ae8d1f4b96d706ac18c4bc44101246cf61383e057f61d437b |
Close
Hashes for tinyobjloader-2.0.0rc8-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0937b73b9a4e180857df0aa1f7da1a4381df70b90e30d7514c1f20188a7182b6 |
|
MD5 | f9c5ee0c7ecfddcc1eb85f9286a40665 |
|
BLAKE2b-256 | 084ef77a9895a8b1df7df95dc11b169d7d6665d9b4e95dd084ed6edf8eb16351 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2d1303f345fe8bd95c0945913f5300e42bf60deaf66aafaaf75822fc956d61 |
|
MD5 | 368baf8695c976f56db02bc5618dfa4a |
|
BLAKE2b-256 | 0159b008aaad5f3ca3d9500b8a6079695b05aaca8ce5ee2458613f5a3e8b5c7f |
Close
Hashes for tinyobjloader-2.0.0rc8-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c99ba36e8dc8e8dd320f8dc951ec0ffcaf7cd45ef7efb07a383520a5fd48be3 |
|
MD5 | c801c13564996a27a75d7ebc91a46b9d |
|
BLAKE2b-256 | c6cc64952ec6a92a1b429fbb4d2b18836a3d64c82cf02e061421daca9d8d5d8e |
Close
Hashes for tinyobjloader-2.0.0rc8-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9496be54eec4f8ee4497aa7c001c9d34b5d2174eed719718e4ca327d3fc79513 |
|
MD5 | 5a47ae5655f096a23f36e37750353a02 |
|
BLAKE2b-256 | 25effae4c9cf9a5e1bd9569e2e65d20e051b7e199aa1f2ac082d7e294e8e3b0c |
Close
Hashes for tinyobjloader-2.0.0rc8-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4ac80e5d79bef0b6a9514454e6391ceb8dab0f2c45354b4eb81584d704e3e87 |
|
MD5 | 9fa48b470ea136f7dacfb11d066290b1 |
|
BLAKE2b-256 | f14124cfe9a95b275df55841720e73ec5b799c325cb98d3be1e11abae85c1f71 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c047b6b2065fef8f0c551264c4a29966ee0c89d652466019c47405992aec1cc |
|
MD5 | 13274dbdbe9a86e96cd0773500cc0e27 |
|
BLAKE2b-256 | 2dd818222dd25ae50c4256a38eebd13b21a1acda2a036f6c8f89d8ff16525550 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f777c9e9aed86ec85d60e4e26e63db5efd262e9e3eeafb10fb7e39fcce6ba0 |
|
MD5 | b1bc14e7b66afd90d0f83af35d532130 |
|
BLAKE2b-256 | 07460571eb45e66943191c27f6814963d691831ef1721149613cca611923ce2d |
Close
Hashes for tinyobjloader-2.0.0rc8-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1c2275c6a9b694e6328fff7c74cffe1c46682437ebacf5e199823b735db120f |
|
MD5 | 17ba7dc006c6155dec3d752936900daa |
|
BLAKE2b-256 | 76f55f0a82797690348ab8f5d748039a015226c722baa408e9b1d3ffe8114d65 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f050d84835e4d23d3f36b686010c95133b127fd261aef8d309a28a58bcc1bc7 |
|
MD5 | 3575534a184e80f6a3e9be7a48997db3 |
|
BLAKE2b-256 | f0445b7a00c7a5a4d716675d023fe31b60543bb74e75772ecd1ac3bdd836fc88 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a95848933970806f59154b7a955284413e1bf43310e90e82ff1968c4d9be52c |
|
MD5 | d69d414d758d0a04b4686e7945433c6a |
|
BLAKE2b-256 | 8923cb98f645bdba047943ee3c5b66802d6af8b07a504c2e1a4e7724342b39aa |
Close
Hashes for tinyobjloader-2.0.0rc8-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6b2e4361c471c458f8e0d9108b0f7824627027cc922a168782851e2d4d237ca |
|
MD5 | 1c46c04d582f6d665f63186bcc70c872 |
|
BLAKE2b-256 | aa238f58398a7f42b1276c9fd1b215881264a55f504c186cbd2a6baef1d8a4b2 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77c63c0d71b65371b54e88410e3c4d36b5ba503de269bf0ba52a87067ced1e7b |
|
MD5 | 06610f49ef2350ca4686a827665ad326 |
|
BLAKE2b-256 | 6ba13a7277753b87a557635cd50adee3e25cb241e7be471f867f8581935f7172 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b59b355aa0843f8bcd8013008124957b3f3a4cb21625b7efcf8a1f6a34044511 |
|
MD5 | 759718d5259a4c03e74200dea034f363 |
|
BLAKE2b-256 | 0156bde06965e8b72a7272f4fff7f06bb84579f2092d3158bb3139729b04dda8 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b75c14c0a4ba47d7794882f5bf2bf67e0c8e86ef339346609265cb507bdc16f |
|
MD5 | 6280b1f270bcae4646f9e872b37989b7 |
|
BLAKE2b-256 | f637b9f059786f801cd418d6c7d463b3272cc23d9c91743330f3a08931d5fe4e |
Close
Hashes for tinyobjloader-2.0.0rc8-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b434d50a109394deb99843c6ecc1427e71bdb89ce390bfe7489298271bf580b |
|
MD5 | c25c1328b77edabed497e4998d90987d |
|
BLAKE2b-256 | d3976bd4a5c33bb5d123acd5c7c7934150bcfee3e6357c0ed43f12018e9c5eec |
Close
Hashes for tinyobjloader-2.0.0rc8-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14dc91c50d79c9104a5f05eea61beaac5887ee0867f2a9be6441fdc53b3fd67d |
|
MD5 | fa3935cfb15fdca4a648c69b6501aa91 |
|
BLAKE2b-256 | 3374cc519a7ade4b43905b1b7b181bb9164361e9b20ed055c5d2de3384ad420c |
Close
Hashes for tinyobjloader-2.0.0rc8-cp27-cp27mu-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be208655b3724d0c0d68b2b0d1e15735bc4e4b77b28eb2390394b54d5e99104f |
|
MD5 | f4dd2701b534e1634ecc3e2c3717ce81 |
|
BLAKE2b-256 | 58fd0a68476139538ee0c4fad0990882d803f19d0eea71868165e8785e8be140 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed33eb14c89acfc3e22c653e60141b512660bbbf068e48244f568e7e49cadab3 |
|
MD5 | 8e06464b5b2ed72ab91784c6196a52dc |
|
BLAKE2b-256 | 8c3eeacfd6d628721bf2b81c1d6cd1032e36730858c201077559bd61b2cb5431 |
Close
Hashes for tinyobjloader-2.0.0rc8-cp27-cp27m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60ebbf1584eaa8fcbbf79c47a709f4e0b34dbd595cb90e27851a587ec71fafcd |
|
MD5 | 0b6c47966145073a2457df6d5be87be0 |
|
BLAKE2b-256 | 27b38979ffa6893cb393c7240c72898745cac242b89a2db68ae7c218276201bf |
Close
Hashes for tinyobjloader-2.0.0rc8-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bafd3e63cbc8b69905a559ffde098bcd139bbf3bff08b7408367cd106606a0bf |
|
MD5 | 16033d86bb1d3484928cd3afe8b6ceb7 |
|
BLAKE2b-256 | 7442b052aadf6a9988a2ddbbe2e0978c7a228bf83bc71dd20746fe37ab59f7cf |