'Serialize this mesh to a string appropriate for disk storage'

def save(self):

    import pickle
    if (self._faces is not None):
        names = ['_vertexes', '_faces']
    else:
        names = ['_vertexesIndexedByFaces']
    if (self._vertexColors is not None):
        names.append('_vertexColors')
    elif (self._vertexColorsIndexedByFaces is not None):
        names.append('_vertexColorsIndexedByFaces')
    if (self._faceColors is not None):
        names.append('_faceColors')
    elif (self._faceColorsIndexedByFaces is not None):
        names.append('_faceColorsIndexedByFaces')
    state = dict([(n, getattr(self, n)) for n in names])
    return pickle.dumps(state)
