Occasional fork of tinyobjloader
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
Built Distributions
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8df2f7ccd67b696ee1907d0185e76052a85d415a4ed0b4d9ce553c777446ae5 |
|
MD5 | 3b0330740e6b8e9fb67c72ccc29e95e7 |
|
BLAKE2b-256 | f5730949a52d996fb4243211e4c495e494d5bffbc8f7bbd4a17b961623ada04d |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-pp37-pypy37_pp73-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40de47ba11ed3895076cf719fccc861d52ac9e3b5ec4604e54c07a46f3a7a459 |
|
MD5 | 58e7803cb2bd00db061903854faa4683 |
|
BLAKE2b-256 | e1fd29f5bfee6a43afedc5de0381f7cada9a5c73e1db8345ba6e2c076e6e21a1 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-pp37-pypy37_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a35eea29c18678a6e30d22daf0a7f07ff455aa016730f35213247c00568cbef2 |
|
MD5 | dbd8e9a74050d4aa0ff0ec645cd9df75 |
|
BLAKE2b-256 | 2e929b7a6d033db7a0392e3c4e04de9b818e175afb26f8eee458ee97ea4cd47e |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaa988489f2cda793352d2b22b274e92df1e950833070cbf156c81b1583bc47e |
|
MD5 | 8ea9314e52c954135c186c198d19b316 |
|
BLAKE2b-256 | 5c00997cd473b390d6af0e2ee88d03cece2fd5924499e1a3c83715809bfdf3f3 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 153952a0e8f7418891514d446f4320e44380ca88de83d4ca298319dcbbc684e1 |
|
MD5 | 09b85125690ef1eae82f7623d6d790a3 |
|
BLAKE2b-256 | f8070309a60337f90e05c1a8252af5d8fd02ee742963b58abe35d3cb7bfff412 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e15c04c07363da5f5670f0c955b107b8ccecc3bb218c4f85bcc8762e5c9d2fb8 |
|
MD5 | 6c33124db752fdfc184fb45f523781e2 |
|
BLAKE2b-256 | ee92f6c84b3de5f3a17fa1970e800416ff2be749be51606e477d3950b14a730b |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-pp27-pypy_73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7925a2efd48539691c9e8404951faf5cf58b657d06370c954d926969ef180387 |
|
MD5 | 8b805c07365dadce726e929885d3c32a |
|
BLAKE2b-256 | cd3e966fb6883e94d6d32c33b799adf3baa133c87cd30c26bf86355426db714d |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-pp27-pypy_73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 802ff5b82d6764b93e20be0cce3cb96ab6f9b97cabb01e60c3766ac4ff97e7ea |
|
MD5 | 1995b1f5ff40f2dd80fa1b2cd4190575 |
|
BLAKE2b-256 | 3b113a45060159ddb62103635a5e086d731f0f5b957dcffa6c03f36dde40823a |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d79ab52ce275578acf6d52ba4b8159c56007e499cdaaec867eb43d92e952e0f |
|
MD5 | 34a807ff1bc6e27df13e84080915548a |
|
BLAKE2b-256 | 98aeb055caee4c29307a7741e662235e638f0c1585c31ec7aa7fad4568569af2 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f75c999016ca32192074347e59500045de1d0f6437843cddd7794dadabad967b |
|
MD5 | 260127e296c820d17d63cd0df7fd485f |
|
BLAKE2b-256 | a89b2c4d0d69492796635ed3b9372d2eabe5786774dfe6b16b80b0c9ce7e55ad |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 493d5ec3e4e3796dde9e7ff554410b38e2ff1d67b54d68e6fa064b18ca8f2ee2 |
|
MD5 | 175e4ddd91718bc6fae19dccbcaa468a |
|
BLAKE2b-256 | 38c2fbc5657049f23b006ee4dc3f47e63e860cea31ab0a05b83bd773e7e2f952 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1c6a67c1236c30ddd09be7a960dbf8b5d0e654ddb40d615c84748796b959fa |
|
MD5 | b146daa6bb4dba5e44ecca5beae2faf6 |
|
BLAKE2b-256 | 586901033447867d8ab314c22b73511a132ec82d387dcf19cd3596640808d67c |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e2d092c1675d5927c168d1a1972fef286b610232661e7998eead87b2be22184 |
|
MD5 | aea50cc6dc54a2d3bde529930345ddb3 |
|
BLAKE2b-256 | cf085d5c07ea62176e4c5c8bf2572b9ca44e82bf03286d139312200c23d778be |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93fb81912ecc740f3113f3e4e9124cb51971c37ceb5c6a0cb79fde0c7524b66b |
|
MD5 | 222d41567d5b77a4f1a954618c21f119 |
|
BLAKE2b-256 | c0177cdbf4a50f93090b2373e15d3c16b9c3a234e38ffb2cc937cf0d0ce6784d |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050e669185cf495aeb149ad30f5db27a2c5904690b054ad036f4da6c60b62755 |
|
MD5 | 0d82d6c1b16fbf6cc628efc0da9e7b73 |
|
BLAKE2b-256 | 9481dbd4afa0348be9eec4fff0088ed345e5d28e1755c30921aafaf9bb4bc780 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd9cc83739c32b825eac964bda09c0b7a277ac4815d805ff1f5a79ec43f0a22 |
|
MD5 | 8377844364ef3c19fc384cb8d38a49c2 |
|
BLAKE2b-256 | a5f90c913d8fc175e5b36447bef9d31ac5aca3e8814b476e67fc89799bca90e8 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f15e10334b0c5281f4d0271350aa6a3aa5f81a828d32c20f6b7ad411230ed6bf |
|
MD5 | 4eab8080abb5dae744beebdba4975d66 |
|
BLAKE2b-256 | c7dffb8144f431b87d3e8e03675bf1480eb1f2388cb245cf77f3e3f46bd9924b |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32287e9f54135a774ba32fb5e3813ba7b870f04e304740036e15e739ec02dc44 |
|
MD5 | d3a255fe4d21c3f5e2314109c71dcf67 |
|
BLAKE2b-256 | b0d5cc34dbe8d9c04c011c2935ab4cbfed363b586ef5a7ecfc3b1cecb8327999 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aee6d24c9c124eab66d7a71b792d1bef56a9ed15cdfdaff379dc600ae1e44497 |
|
MD5 | d96b36b5dee81987225bf8938fc37011 |
|
BLAKE2b-256 | cc29de85acc95b3289a9ee6736502fffe6f36b10d88b851c2748da8253100177 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69755837cba7dacaf4b7960280abe09e4c78cd798e9b905e25c7753bb59e8c0e |
|
MD5 | d04ebff934d1ac97affdeb2d6d255c30 |
|
BLAKE2b-256 | d272872dad34fc32b23758068ef9e14954973521b65de8fe3499bbc2b8e3a46d |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 164bff3e45a6d66bff8199bc599abd02029ffa2127911e6d32719a1aedffca75 |
|
MD5 | ad6a2334af4cda9bfb087a6e17b3e950 |
|
BLAKE2b-256 | 35455625b9389da18cdb8446f64382e9c9c85dad029ae0ef32fcd0fabe0e71fb |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b1e831389b2dcff0af3e2d2eb8629f18e4b1b5b2206fb94661eb27057df4e44 |
|
MD5 | d3b1a304ce1deb0b7ae74fd693a931c4 |
|
BLAKE2b-256 | 6fc0887f0434fbb57ce2eba21d58fc58d3ec011c85bc74a850447bd8ccc2cf53 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 347abdb01d31c482caa58f02e0b878476c5763a6c311b5be79189fc86fccdddb |
|
MD5 | 25768d1c5473574106561bfe4fc3676e |
|
BLAKE2b-256 | 4337b917fb82685b83d0e68d16864f08df2d9a28fd32a53187f016a3cb5c2579 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09693223668a7a9f5ed3adf9362d6f87496fa5a45f87ec0c75537980d34911f4 |
|
MD5 | 6bf3055460fd57ea323e0a98fc6c52dd |
|
BLAKE2b-256 | a33efcff379de9567b65dfb87055aff84ef4967bece79312e44534fb76afe90b |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c561816396b1f9e2239dd272011774c4c012ec15c21ea61e8b5ef0eb46cce413 |
|
MD5 | 8c3b45c5db39d21971fecdb9d513d594 |
|
BLAKE2b-256 | 8c51ed8a330516ff6f7c0de363291099b10b471eba41c2d15976905c8de7a022 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff56a5c3d3b78f604cf610330e542c0e2e6bb778759f87cbdbf9094a2fe6b649 |
|
MD5 | 10e79a3723675d86c5853184abb83147 |
|
BLAKE2b-256 | 2ba6d0531cfda6298ea9763a2f43e547225bd8eaa9d8acded2843822abde0b21 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62019e13914f33471b8b398d03cce3f26600aa7639b24afaf62c207fe7572fe9 |
|
MD5 | 9825a653110bb50eed6912caf3d4c592 |
|
BLAKE2b-256 | e4cf890c8028362726a19923e944e6f086f9d0a3987f3bdf334daf073fbf2c03 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f94533da30975c3fc3539d5a8591a8c025e4cc9fc2e99e15193515e7c24f7f9 |
|
MD5 | f9d325a40b557e3c1f638eff7772a95b |
|
BLAKE2b-256 | 1aae71d14871d1db2879a205f2d9d157bba7f4824ba8dd0fdb90f27b289db0a1 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3697ea6d3e0f415483c70654fbb99a130aae2d8817920e3ed4d0d93c18a5f1a |
|
MD5 | 0e54c2912b1a75c68b1d5405da689cc8 |
|
BLAKE2b-256 | 026089b5429ac65797678ad182b2af4c25d6119240875f6cc16b7d4e00353e10 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e71225a62b56cb8ef8ad80eee1d682b7cc752b8dc3583e345350209d318735c5 |
|
MD5 | e8235b72587bf3404dca31b9892159f7 |
|
BLAKE2b-256 | 332ae10809aad730909d0c31b8c46cc429dfd8482550c8cc42bae598ac9fdb23 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e56b2fdae384ac1e6c2a16a32b529e2eb88918c097f3160db577bba617b7c0f8 |
|
MD5 | a064b26517f9e92877d162cc9967f5c6 |
|
BLAKE2b-256 | 57efee337d1df8bf6ef52afa42ba356b30dc51e0f67abf013f144632083a9954 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d16f4873e507a426e9f9828969f2aae57a52001345fb11167e69f0bff94f2cad |
|
MD5 | c47f2dd160099c29a793a841d03415e0 |
|
BLAKE2b-256 | 3b5fea92b84748a2b577d54848251a013339d4faf82f8c1cf14bebee6244b531 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba0cad4bf91a5361514950b0c26fdf4745f6a85b93196a8e82cac75fa49c55c4 |
|
MD5 | bbf6998b6001c2415181a198916fc83f |
|
BLAKE2b-256 | 2cb5b937e2e6450929c37e3551f2b14947117382b39538e668f6511296dd5165 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fdb13e18c8bc687c2917bd26a19257676c40b9e97525cb5685677b375396f0b |
|
MD5 | ab6376e1de1b0de6e8c329011ee72236 |
|
BLAKE2b-256 | 1c668e15a511d211a1250922e8eaffab80c39cc64d32c4c76d1ff3d120a89506 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp27-cp27mu-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 746a13917bd4ec32a555fc50ab59a4152448fa6de4e7f461dcb07a32f284b23d |
|
MD5 | ee77e2fffaffce1ec9dbf03239ace983 |
|
BLAKE2b-256 | fd20daedbc7523dcff4c3e5777f9dd7e1c27fa6e413a4e03aa617840cdb4e21f |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e83af4627fab549ccd22ad18f0fc7be1dde914ea5717c325df49de15dec4b0be |
|
MD5 | fa8ea8b46aaa94f7b53ca28075496391 |
|
BLAKE2b-256 | 63f60987b868b2eb4583fac7c84ec70cbe1f696f6f92289aa756d4c129dc29af |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp27-cp27m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8dc1a6082fd90293851f41b990f0bd7275a7b4003dfaa4f4028cdb1d41a8159 |
|
MD5 | 4e5ca2ca0a0de1a296de4324ccfb0bdc |
|
BLAKE2b-256 | 02d8ea82800cc84728357dccb6d7b50318d2ec693c2a46443b27dddcf3e77828 |
Close
Hashes for tinymetabobjloader-2.0.0rc9.dev0-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcbd9e210548ed92edfdfa123e89395f1e6697e8a079749e0e1d577dfa7e6786 |
|
MD5 | fea7c83fdb279cf465c8704dedf74bb4 |
|
BLAKE2b-256 | 3e642d929003b1e1967e61ca25c465d0004906b6e96a29ebc5253d04d72c5742 |