diff --git a/port/PyAssimp/pyassimp/__init__.py b/port/PyAssimp/pyassimp/__init__.py index e69de29bb..229d2296c 100644 --- a/port/PyAssimp/pyassimp/__init__.py +++ b/port/PyAssimp/pyassimp/__init__.py @@ -0,0 +1 @@ +#-*- coding: UTF-8 -*- diff --git a/port/PyAssimp/pyassimp/pyassimp.py b/port/PyAssimp/pyassimp/pyassimp.py index 49b2a7004..55ae53be5 100644 --- a/port/PyAssimp/pyassimp/pyassimp.py +++ b/port/PyAssimp/pyassimp/pyassimp.py @@ -1,3 +1,11 @@ +#-*- coding: UTF-8 -*- + +""" +PyAssimp + +This is the main-module of PyAssimp. +""" + import structs import ctypes import os diff --git a/port/PyAssimp/pyassimp/structs.py b/port/PyAssimp/pyassimp/structs.py index d509e9108..0a7494602 100644 --- a/port/PyAssimp/pyassimp/structs.py +++ b/port/PyAssimp/pyassimp/structs.py @@ -1,5 +1,7 @@ +#-*- coding: UTF-8 -*- + """ -All ASSIMP C-structures. +All ASSIMP C-structures. See the Assimp-headers for all formats. """ from ctypes import POINTER, c_int, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte diff --git a/port/PyAssimp/sample.py b/port/PyAssimp/sample.py index b3fe8866c..386329205 100644 --- a/port/PyAssimp/sample.py +++ b/port/PyAssimp/sample.py @@ -1,15 +1,30 @@ -from pyassimp import pyassimp +#-*- coding: UTF-8 -*- -MODEL = r"../test.ase" +""" +This module demonstrates the functionality of PyAssimp. +""" + + +from pyassimp import pyassimp +import os + +#get a model out of assimp's test-data +MODEL = os.path.join(os.path.dirname(__file__), + "..", "..", + "test", "ASEFiles", "MotionCaptureROM.ase") def main(): scene = pyassimp.load(MODEL) + #the model we load + print "MODEL:", MODEL + print + #write some statistics print "SCENE:" print " flags:", ", ".join(scene.list_flags()) print " meshes:", len(scene.meshes) - print "" + print print "MESHES:" for index, mesh in enumerate(scene.meshes): print " MESH", index+1 @@ -17,7 +32,7 @@ def main(): print " first:", mesh.vertices[:3] print " colors:", len(mesh.colors) print " uv-counts:", mesh.numuv - print "" + print if __name__ == "__main__":