parameters: (filename,
           file_type  = None,
           processing = postprocess.aiProcess_Triangulate)
docstring: 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
docstring_summary: Load a model into a scene. On failure throws AssimpError.
docstring_tokens: Load a model into a scene . On failure throws AssimpError .
function: def 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
      '''
  
      if hasattr(filename, 'read'):
          # This is the case where a file object has been passed to load.
          # It is calling the following function:
          # const aiScene* aiImportFileFromMemory(const char* pBuffer,
          #                                      unsigned int pLength,
          #                                      unsigned int pFlags,
          #                                      const char* pHint)
          if file_type is None:
              raise AssimpError('File type must be specified when passing file objects!')
          data  = filename.read()
          model = _assimp_lib.load_mem(data,
                                       len(data),
                                       processing,
                                       file_type)
      else:
          # a filename string has been passed
          model = _assimp_lib.load(filename.encode(sys.getfilesystemencoding()), processing)
  
      if not model:
          raise AssimpError('Could not import file!')
      scene = _init(model.contents)
      recur_pythonize(scene.rootnode, scene)
      try:
          yield scene
      finally:
          release(scene)
function_tokens: def load ( filename , file_type = None , processing = postprocess . aiProcess_Triangulate ) : if hasattr ( filename , 'read' ) : # This is the case where a file object has been passed to load. # It is calling the following function: # const aiScene* aiImportFileFromMemory(const char* pBuffer, #                                      unsigned int pLength, #                                      unsigned int pFlags, #                                      const char* pHint) if file_type is None : raise AssimpError ( 'File type must be specified when passing file objects!' ) data = filename . read ( ) model = _assimp_lib . load_mem ( data , len ( data ) , processing , file_type ) else : # a filename string has been passed model = _assimp_lib . load ( filename . encode ( sys . getfilesystemencoding ( ) ) , processing ) if not model : raise AssimpError ( 'Could not import file!' ) scene = _init ( model . contents ) recur_pythonize ( scene . rootnode , scene ) try : yield scene finally : release ( scene )