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
Metadata
Release files for tinyobjloader 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tinyobjloader-0.1.tar.gz | 3.1 kB | Without provenance | Details for tinyobjloader-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tinyobjloader-0.1-cp36-cp36m-manylinux1_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.5+ x86-64 | Details for tinyobjloader-0.1-cp36-cp36m-manylinux1_x86_64.whl |
Total release size: 1.4 MB
Release files / tinyobjloader-0.1.tar.gz
| Download URL | tinyobjloader-0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e860164a0e633d476fbc87d05b92db13f198d96a7a1c8e556134bc1a95d6932
|
|
BLAKE2b-256 checksum How to use checksums |
c0eef447ed517ff301034b30a1f28fc76365f20bbb70480ca3b7d773803306b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4
|
Release files / tinyobjloader-0.1-cp36-cp36m-manylinux1_x86_64.whl
| Download URL | tinyobjloader-0.1-cp36-cp36m-manylinux1_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
65067d820e56e1a2f36ef672641f3f9885ee9724b03ececa70bffaf00e40731f
|
|
BLAKE2b-256 checksum How to use checksums |
780f6f8b366ae3a30ce7aebd9080fea59723e459f624e64391274d9ae7cfa597
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4
|
Security for tinyobjloader 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.