This module contains the MBReader class which can be used as a base class for reading Maya Binary (*.mb) files. The class parses the structure of the file and invokes a callback method for every chunk found in the file. The actual decoding of the chunk data has to be done in a derived class.
The MBReader class reads Maya Binary files and calls appropriate methods which have to be implemented in a derived class. A Maya Binary file is composed of chunks that contain the actual data. There can be data chunks that contain the actual data and group chunks that contain the data chunks.
Creates an instance of the reader.
The file name (if it could be obtained). This may be used for generating warning or error messages.
Read the content of a file. file is either a file like object that can be used to read the content of the file or the name of a file.
Aborts reading the current file. This method can be called in handler methods to abort reading the file.
Callback that is called whenever a new group tag begins. chunk is a GroupChunk object containing information about the group chunk.