Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load(filename):
scene = pyassimp.load(filename, processing=pyassimp.postprocess.aiProcess_GenUVCoords|pyassimp.postprocess.aiProcess_Triangulate )
mesh = scene.meshes[0]
return mesh.vertices, mesh.normals, mesh.texturecoords[0,:,:2]
def get_pyassimp_load_options(self):
load_flags = assimp.postprocess.aiProcess_Triangulate;
load_flags = load_flags | assimp.postprocess.aiProcess_SortByPType;
load_flags = load_flags | assimp.postprocess.aiProcess_OptimizeMeshes;
load_flags = load_flags | assimp.postprocess.aiProcess_RemoveRedundantMaterials;
load_flags = load_flags | assimp.postprocess.aiProcess_FindDegenerates;
load_flags = load_flags | assimp.postprocess.aiProcess_GenSmoothNormals;
load_flags = load_flags | assimp.postprocess.aiProcess_JoinIdenticalVertices;
load_flags = load_flags | assimp.postprocess.aiProcess_ImproveCacheLocality;
load_flags = load_flags | assimp.postprocess.aiProcess_GenUVCoords;
load_flags = load_flags | assimp.postprocess.aiProcess_FindInvalidData;
return load_flags