Commit Graph

6 Commits (9dd0ddc747e8523126aa4614edd383dcb13a07a2)

Author SHA1 Message Date
Séverin Lemaignan 18825179d0 [pyassimp] Support Python3
This include the renaming of __init__.py in core.py to solve tricky imports issues

sample.py runs correctly, except that the ctype structure returned is not
complete. The issue is very similar to the one we have with 32bits/64bits
issues

Removed the PyAssimp3 subproject project.

To maintain source compatibility between py2 and py3, python >= 2.6 is now required
2012-10-23 14:55:53 +02:00
Séverin Lemaignan 4e9214c624 [pyassimp] Apply post-processing on ctypes ASSIMP structure
- bind meshes to their materials
- add transformations to cameras
2012-10-23 14:55:53 +02:00
Séverin Lemaignan 511f80d047 [pyassimp] Use numpy when possible
It allows for faster access to data, brings useful methods and is
pyOpenGL-friendly

It eases manipulation of matrices and vectors (many operations like
product, transposition, etc. are available)

numpy.array are also directly usable in many places in pyopengl.

And make sure we store floats as float32 to please OpenGL

Update sample.py to be happy with numpy arrays
2012-10-23 14:55:52 +02:00
Séverin Lemaignan 7000ea05c5 [pyassimp] Large rewrite: more generic, easier to use
Main changes:
- dynamic creation of idiomatic python fields corresponding to ASSIMP ones,
- hidding of pointers,
- use of numpy for transformation and mesh data storage

For instance, to access the list of meshes of a children of the root
node, previously we did:

scene.mRootNode.contents.mChildren[1].contents.mMeshes

Now, it is:
scene.rootnode.children[1].meshes

Arrays are now regular Python list.

Also added a 'post-processing' to access directly to certain objects,
and not through their index. For instance:

Before:

mymesh_id = scene.mRootNode.contents.mChildren[1].contents.mMeshes[2]
mymesh = scene.mMeshes[mymesh_id]

Now:
scene.rootnode.children[1].meshes[2]

Initialization of the Python wrappers is not delayed anymore: everything
is done during the loading (which leads to long start time, but prevent
unexpected slowing at runtime)

This commit also remove several 'ad-hoc' manipulation that should not
be needed anymore.

While here, use Python logging when necessary.
2012-10-23 14:53:00 +02:00
sebastianhempel 4b013dbeba basic setup for test-models and some docstrings.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@148 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-09-17 17:08:36 +00:00
sebastianhempel 4f5a880306 PyAssimp initial import.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@147 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2008-09-17 15:25:20 +00:00