Prechádzať zdrojové kódy

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
sebastianhempel 17 rokov pred
rodič
commit
4b013dbeba

+ 1 - 0
port/PyAssimp/pyassimp/__init__.py

@@ -0,0 +1 @@
+#-*- coding: UTF-8 -*-

+ 8 - 0
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

+ 3 - 1
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

+ 18 - 3
port/PyAssimp/sample.py

@@ -1,15 +1,30 @@
+#-*- coding: UTF-8 -*-
+
+"""
+This module demonstrates the functionality of PyAssimp.
+"""
+
+
 from pyassimp import pyassimp
+import os
 
-MODEL = r"../test.ase"
+#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__":