basic setup for test-models and some docstrings.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@148 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
4f5a880306
commit
4b013dbeba
|
@ -0,0 +1 @@
|
|||
#-*- coding: UTF-8 -*-
|
|
@ -1,3 +1,11 @@
|
|||
#-*- coding: UTF-8 -*-
|
||||
|
||||
"""
|
||||
PyAssimp
|
||||
|
||||
This is the main-module of PyAssimp.
|
||||
"""
|
||||
|
||||
import structs
|
||||
import ctypes
|
||||
import os
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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__":
|
||||
|
|
Loading…
Reference in New Issue