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
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
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.
structgen.py has been modified to make the resulting structs.py
more readable: comments should now correctly appear next to the
fields in the generated structs.py
Do not discard the size_t type. size_t was wrongly replaced by uint in ctypes
This caused corruptions when running pyassimp with a 64bits assimp library
While here, updated the max size of some meshes attributes (that leads
to corruptions as well)
While here, update paths to find the assimp headers
Updated structs.py to match assimp 2.0.863 (Ubuntu 12.04). It has been
also tested with libassimp as build from the trunk.
Before, neither the texture index nor its semantic were kept in the
returned output. Now GetMaterialProperties returns a (name, color,
material, texture) tuple. Name is the name of the material. Color is a
dictionary of color properties. Material is a dictionary of material
properties. Textures is a triply nested dictionary addressed by the
following: textures[index][semantic][key]. See assimp documentation for
the meaning of index, semantic, and keys in general.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1106 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
the strings used in materials and elsewhere in assimp. Because of this,
in PyAssimp3 strings in materials don't work properly on 64 bits
platforms. This commit adds a StringUInt32 ctypes structure and use it
in GetMaterialProperties as a workaround.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1105 67173fc5-114c-0410-ac8e-9d2fd5bffc1f