class AssimpImporter(MeshImporter): """ Uses assimp to import meshes. The assimp importing is wrapped via cython, Parameters ---------- filepath : string Absolute filepath of the mesh. """ def __init__(self, filepath, texture=True): MeshImporter.__init__(self, filepath, texture=texture) self.ai_importer = AIImporter(filepath) def _parse_format(self): r""" Use assimp to build the mesh and get the relative texture path. """ self.ai_importer.build_scene() self.meshes = self.ai_importer.meshes self.relative_texture_path = self.ai_importer.assimp_texture_path
def __init__(self, filepath, texture=True): MeshImporter.__init__(self, filepath, texture=texture) self.ai_importer = AIImporter(filepath)
def __init__(self, filepath, texture=True): from cyassimp import AIImporter # expensive import MeshImporter.__init__(self, filepath, texture=texture) self.ai_importer = AIImporter(filepath)