OEWriteSurface

OEWriteSurface(fname: str, surf: OESurface) -> bool
OEWriteSurface(ofs: oeostream, surf: OESurface, type: int) -> bool

Write surf to the surface file fname. Returns false if fname is not a valid surface file name. This will overwrite the previous file if it existed.

The overload that takes an oeostream can be used to write multiple surfaces to the same destination. Note that the format must be specified by a constant from the OESurfaceFileType namespace as the type argument. The OESurfaceFileType_Grasp format does not support this kind of use. Returns true if written successfully.