Skip to content

Commit

Permalink
- update pyassimp genstructs script to work with the latest headers, …
Browse files Browse the repository at this point in the history
…add rudimentary test script to batch-load all test files using pyassimp

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@951 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
  • Loading branch information
aramis_acg committed Apr 19, 2011
1 parent 6e74e06 commit 9350d0e
Show file tree
Hide file tree
Showing 5 changed files with 342 additions and 780 deletions.
11 changes: 8 additions & 3 deletions port/PyAssimp/README
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@


-- a simple Python wrapper for Assimp using ctypes to access
the library. Tested for Python 2.6, should work with
older versions as well.
the library. Tested for Python 2.6. Known not to work with
Python 2.4.


Note that pyassimp is by no means considered mature. It works,
but it is far away from wrapping Assimp perfectly.


USAGE
=====
Expand Down Expand Up @@ -58,4 +63,4 @@ There's an 'additional_dirs' list waiting for your entries.




6 changes: 5 additions & 1 deletion port/PyAssimp/pyassimp/pyassimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
This is the main-module of PyAssimp.
"""

import sys
if sys.version_info < (2,5):
raise 'pyassimp: need python 2.5 or newer'

import structs
import ctypes
import os
Expand Down Expand Up @@ -160,7 +164,7 @@ def _init(self):
Python magic to add the _init() function to all C struct classes.
"""
for struct in dir(structs):
if not (struct.startswith('_') or struct.startswith('c_') or struct == "Structure" or struct == "POINTER"):
if not (struct.startswith('_') or struct.startswith('c_') or struct == "Structure" or struct == "POINTER") and not isinstance(getattr(structs, struct),int):
setattr(getattr(structs, struct), '_init', _init)


Expand Down
Loading

0 comments on commit 9350d0e

Please sign in to comment.