Minimal Python Bindings for ASSIMP Library using C-API
Project description
assimp-py
Minimal Python Bindings for ASSIMP Library using C-API
Installation
pip install assimp-py
from source
git clone https://github.com/ranjian0/assimp_py.git
cd assimp_py
python setup.py install
cmake>=3.18 is required for building from source
[Optional] Run tests to make sure everything works fine
pip install pytest
pytest tests
Example Program
import assimp_py
# -- loading the scene
process_flags = (
assimp_py.Process_Triangulate | assimp_py.Process_CalcTangentSpace
)
scene = assimp_py.ImportFile("models/planet/planet.obj", process_flags)
# -- getting data
for m in scene.meshes:
# -- getting vertex data
# vertices are guaranteed to exist
verts = m.vertices
# other components must be checked for None
normals = [] or m.normals
texcoords = [] or m.texcoords
tangents = [] or m.tangents
bitangent = [] or m.bitangents
# -- getting materials
# mat is a dict consisting of assimp material properties
mat = scene.materials[m.material_index]
# -- getting color
diffuse_color = mat["COLOR_DIFFUSE"]
# -- getting textures
diffuse_tex = mat["TEXTURES"][assimp_py.TextureType_DIFFUSE]
Supported Mesh Formats
AMF 3DS AC ASE ASSBIN B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS M3D MD2 MD3 MD5 MDC MDL NFF NDO OFF OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD OBJ
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
assimp_py-1.0.7.tar.gz
(8.5 MB
view hashes)
Built Distributions
Close
Hashes for assimp_py-1.0.7-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d55af1729faea527a28aee97cbe426e50ff825e68b4ae33b8491fe67e1d3d6d |
|
MD5 | d5963554ded15504d23a7b02d793ac12 |
|
BLAKE2b-256 | 00a8ed48becca19e5912fb07a09533ae8f3039a624f7bc38046b19791b634e18 |
Close
Hashes for assimp_py-1.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6456758a790e594676695ed37546eb47d6d5a2f513ddeee3e86d7c1a964046f |
|
MD5 | 9af0165a0858700a7eaff14242c7ac55 |
|
BLAKE2b-256 | bcb03e2c51d600ea27fd005e540e3ac5d268d4b2e6018cfd265334e925e9c7e3 |
Close
Hashes for assimp_py-1.0.7-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd9b43717d791372a98885ff33744ee76b6aec9cfde50b46a59f449f755f9342 |
|
MD5 | 56133ec7b8f5dde891e6e692365a5cde |
|
BLAKE2b-256 | e2f4e46e6d974232c1df19c33ab5307587c1063afe7a6a5aeeab00d70e9a5781 |
Close
Hashes for assimp_py-1.0.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fee0d3e114d502b1ff30fe2ab1881a69c08424fe8bbd75227a9bb11bc9236d34 |
|
MD5 | f53f9009495e5f634d487ab76142212d |
|
BLAKE2b-256 | cc65397e9ef3c44a90023dd15a8331f98a59735806efcb9a96b833c72fd355b1 |
Close
Hashes for assimp_py-1.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9987faf9290d0e9ea170935c1a613f57b7139c5de227528b33635b310857d64c |
|
MD5 | c2d239b1c0dc5b54704b2c7e6ec385e8 |
|
BLAKE2b-256 | a30de5a4b0826fc01f4a54cb115cd22f3dd99bbcb7a04cd1c13e1e98eb598edc |
Close
Hashes for assimp_py-1.0.7-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fc06833ee96cc6c405340126f813e3760b2af71082bd008ac9ca81bffd39dd8 |
|
MD5 | f030f09fae564f359f156093cd5d117e |
|
BLAKE2b-256 | 27629ef24309d5eb4645f5ab681609d81f1d9f082fc91c2c41b9ef82c6f4cfd3 |
Close
Hashes for assimp_py-1.0.7-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a27b0afbb160236736330e87c4f61acb2cfed8e98edfb5ea23bfa2f7ec47531 |
|
MD5 | 8ac46ab2dab27e8bb9452896ce3c75da |
|
BLAKE2b-256 | 3aaa94e0c9217d1b83c24a4d38741f03ea9ee1e5a3c2417aeab74cf373df105b |
Close
Hashes for assimp_py-1.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 760d00bfc4610d20c73c02a0460b6595194c72b6d3a62f776e716fbc61312b1a |
|
MD5 | f5453dd530069cfd472a4351c71b0c41 |
|
BLAKE2b-256 | f603a50640d05cd4a7650c5495f7f827c9283f5f29e2a0e50ddc4d2ba4aa4128 |
Close
Hashes for assimp_py-1.0.7-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9acc265032a05db941a8ce745fc45231c8e4f7cde83eabffce58f344c2d2a052 |
|
MD5 | eb4c2833d73a627bb862412354bdc92e |
|
BLAKE2b-256 | 890b5f087c18939ca88ce9b71464068d8ce0b4c70da6b12c3bf0168488780f04 |