Assimp  v3.1.1 (June 2014)
pyassimp.core Namespace Reference

Classes

class  AssimpLib
 
class  PropertyGetter
 

Functions

def call_init (obj, caller=None)
 
def decompose_matrix (matrix)
 
def export (scene, filename, file_type=None, processing=postprocess.aiProcess_Triangulate)
 
def load (filename, file_type=None, processing=postprocess.aiProcess_Triangulate)
 
def make_tuple (ai_obj, type=None)
 
def pythonize_assimp (type, obj, scene)
 
def recur_pythonize (node, scene)
 
def release (scene)
 

Variables

dictionary assimp_struct_inits = { structs.Face : _init_face }
 
 logger = logging.getLogger("pyassimp")
 
 numpy
 
 xrange = range
 

Detailed Description

PyAssimp

This is the main-module of PyAssimp.

Function Documentation

§ call_init()

def pyassimp.core.call_init (   obj,
  caller = None 
)

§ decompose_matrix()

def pyassimp.core.decompose_matrix (   matrix)

§ export()

def pyassimp.core.export (   scene,
  filename,
  file_type = None,
  processing = postprocess.aiProcess_Triangulate 
)
Export a scene. On failure throws AssimpError.

Arguments
---------
scene: scene to export.
filename: Filename that the scene should be exported to.  
file_type: string of file exporter to use. For example "collada".
processing: assimp postprocessing parameters. Verbose keywords are imported
            from postprocessing, and the parameters can be combined bitwise to
            generate the final processing value. Note that the default value will
            triangulate quad faces. Example of generating other possible values:
            processing = (pyassimp.postprocess.aiProcess_Triangulate | 
                          pyassimp.postprocess.aiProcess_OptimizeMeshes)

§ load()

def pyassimp.core.load (   filename,
  file_type = None,
  processing = postprocess.aiProcess_Triangulate 
)
Load a model into a scene. On failure throws AssimpError.

Arguments
---------
filename:   Either a filename or a file object to load model from.
            If a file object is passed, file_type MUST be specified
            Otherwise Assimp has no idea which importer to use.
            This is named 'filename' so as to not break legacy code. 
processing: assimp postprocessing parameters. Verbose keywords are imported
            from postprocessing, and the parameters can be combined bitwise to
            generate the final processing value. Note that the default value will
            triangulate quad faces. Example of generating other possible values:
            processing = (pyassimp.postprocess.aiProcess_Triangulate | 
                          pyassimp.postprocess.aiProcess_OptimizeMeshes)
file_type:  string of file extension, such as 'stl'
    
Returns
---------
Scene object with model data

§ make_tuple()

def pyassimp.core.make_tuple (   ai_obj,
  type = None 
)

§ pythonize_assimp()

def pyassimp.core.pythonize_assimp (   type,
  obj,
  scene 
)
This method modify the Assimp data structures
to make them easier to work with in Python.

Supported operations:
 - MESH: replace a list of mesh IDs by reference to these meshes
 - ADDTRANSFORMATION: add a reference to an object's transformation taken from their associated node.

:param type: the type of modification to operate (cf above)
:param obj: the input object to modify
:param scene: a reference to the whole scene

§ recur_pythonize()

def pyassimp.core.recur_pythonize (   node,
  scene 
)
Recursively call pythonize_assimp on
nodes tree to apply several post-processing to
pythonize the assimp datastructures.

§ release()

def pyassimp.core.release (   scene)

Variable Documentation

§ assimp_struct_inits

dictionary pyassimp.core.assimp_struct_inits = { structs.Face : _init_face }

§ logger

pyassimp.core.logger = logging.getLogger("pyassimp")

§ numpy

pyassimp.core.numpy

§ xrange

pyassimp.core.xrange = range