|
Assimp
v4.1. (December 2018)
|
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 | export_blob (scene, 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 | |
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.export_blob | ( | scene, | |
file_type = None, |
|||
processing = postprocess.aiProcess_Triangulate |
|||
| ) |
Export a scene and return a blob in the correct format. On failure throws AssimpError.
Arguments
---------
scene: scene to export.
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)
Returns
---------
Pointer to structs.ExportDataBlob
| 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 | ) |
| dictionary pyassimp.core.assimp_struct_inits = { structs.Face : _init_face } |
| pyassimp.core.logger = logging.getLogger("pyassimp") |
| pyassimp.core.numpy |
| pyassimp.core.xrange = range |