Minimal Python Bindings for ASSIMP Library using C-API
Project description
assimp-py
Minimal Python Bindings for ASSIMP Library using C-API
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]
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.2.tar.gz
(407.9 kB
view hashes)
Built Distributions
Close
Hashes for assimp_py-1.0.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f616b271cde8c3f30ce5132aa832c9f85fed43a6d6ccfbf710e56452ecad645 |
|
MD5 | eac62386f1877dbb47f047a5fafa164d |
|
BLAKE2b-256 | 4f2311bad15378fbb9cccd9682d401f1e2f38cc57b75d74880f45be9d39f7eda |
Close
Hashes for assimp_py-1.0.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b2b0dda8848679067a356f2d8550ee401c7408ff190a8b239b4689fb245bb5 |
|
MD5 | b68db81e828459019af0587b24b5a9f9 |
|
BLAKE2b-256 | 2dae6a317507a7ef703733f72031054d367f05cc1ed4efa3aef6343a92d773db |
Close
Hashes for assimp_py-1.0.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db9ff4d3b495814a1a77555a9a4fcc1a272d7a0631c08e0d7b28df4340e563b |
|
MD5 | 74ea3fc668f7209e2dc4fa3659812cb6 |
|
BLAKE2b-256 | de3b33b4a07badbeea6c3305892ad9afe0abf036c224ff6fda43e76b568b1f4b |
Close
Hashes for assimp_py-1.0.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fab8aaab2140d955487a933019085a439ea6284b76f8f4b736e67c9efbd6411 |
|
MD5 | f11404125da93095e6870d0f535b34af |
|
BLAKE2b-256 | 812c36d6a4d9e2f23dbf8689a84e91989d004443934828ed41561b35741ff961 |
Close
Hashes for assimp_py-1.0.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41a1f745b259adf33f6d94bdb443f32867099f51b1e08cdba36d728d4ca74bb5 |
|
MD5 | ff0145e2bbb9d9c4de1bc3ef371c7ff0 |
|
BLAKE2b-256 | 46cf91a5be734900b9f903856532538ffd2965d1fad170a1909f87856de1cae5 |
Close
Hashes for assimp_py-1.0.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2192aae52751b746bd923098e1b3afc5f3c7e880e6191bb50cce4a9af8215879 |
|
MD5 | 791f78e27cb156fc662caa7699bd313b |
|
BLAKE2b-256 | 28aeea92e4373e09a86709d30de37f713de6f1b5756ffd2d9104a425ecce64f1 |
Close
Hashes for assimp_py-1.0.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06a3db41110c7565b495e6523f7efd50a68851344f652c3a9f4327214c306fe2 |
|
MD5 | 6faa4a21d66447bab75dd10cc6ea85b4 |
|
BLAKE2b-256 | 166c445e8948b41b3ff14cc5edc9c4f8b23d5d2e4543305641f1f02389e9c503 |
Close
Hashes for assimp_py-1.0.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd8492ab981ee6b3b60ee90d926dd17027110c04eec231afba97e492488988eb |
|
MD5 | b5804bee3f8a7e19cf37aa091a4d5ace |
|
BLAKE2b-256 | 833ea712721847ba99fef943c94d979af48c041e346d0bd80485729dee8f8a46 |
Close
Hashes for assimp_py-1.0.2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b663e549631409f2289a2c5ed52264a0cf72e9d44e74d03b262beb559675058e |
|
MD5 | a3c70fd626680e892f016c9576cbfcb9 |
|
BLAKE2b-256 | c88d884522f1ebc1e599a2e2ad5e40e0b7c434c67b573b8f60adb166f4b707df |