Assimp
v3.1.1 (June 2014)
|
Classes | |
class | AssimpLib |
class | PropertyGetter |
Functions | |
def | call_init |
def | decompose_matrix |
def | export |
def | load |
def | make_tuple |
def | pythonize_assimp |
def | recur_pythonize |
def | release |
Variables | |
tuple | _assimp_lib = AssimpLib() |
dictionary | assimp_struct_inits = { structs.Face : _init_face } |
tuple | logger = logging.getLogger("pyassimp") |
xrange = range | |
PyAssimp This is the main-module of PyAssimp.
def pyassimp.core.call_init | ( | obj, | |
caller = None |
|||
) |
def pyassimp.core.decompose_matrix | ( | matrix | ) |
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)
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
def pyassimp.core.make_tuple | ( | ai_obj, | |
type = None |
|||
) |
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
def pyassimp.core.recur_pythonize | ( | node, | |
scene | |||
) |
Recursively call pythonize_assimp on nodes tree to apply several post-processing to pythonize the assimp datastructures.
def pyassimp.core.release | ( | scene | ) |
tuple pyassimp.core._assimp_lib = AssimpLib() |
dictionary pyassimp.core.assimp_struct_inits = { structs.Face : _init_face } |
tuple pyassimp.core.logger = logging.getLogger("pyassimp") |
pyassimp.core.xrange = range |