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
pull/1/head
sebastianhempel 2008-09-17 17:08:36 +00:00
parent 4f5a880306
commit 4b013dbeba
4 changed files with 31 additions and 5 deletions

View File

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

View File

@ -1,3 +1,11 @@
#-*- coding: UTF-8 -*-
"""
PyAssimp
This is the main-module of PyAssimp.
"""
import structs import structs
import ctypes import ctypes
import os import os

View File

@ -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 from ctypes import POINTER, c_int, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte

View File

@ -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(): def main():
scene = pyassimp.load(MODEL) scene = pyassimp.load(MODEL)
#the model we load
print "MODEL:", MODEL
print
#write some statistics #write some statistics
print "SCENE:" print "SCENE:"
print " flags:", ", ".join(scene.list_flags()) print " flags:", ", ".join(scene.list_flags())
print " meshes:", len(scene.meshes) print " meshes:", len(scene.meshes)
print "" print
print "MESHES:" print "MESHES:"
for index, mesh in enumerate(scene.meshes): for index, mesh in enumerate(scene.meshes):
print " MESH", index+1 print " MESH", index+1
@ -17,7 +32,7 @@ def main():
print " first:", mesh.vertices[:3] print " first:", mesh.vertices[:3]
print " colors:", len(mesh.colors) print " colors:", len(mesh.colors)
print " uv-counts:", mesh.numuv print " uv-counts:", mesh.numuv
print "" print
if __name__ == "__main__": if __name__ == "__main__":