OOF2: The Manual

Name

OOF.File.Save.Materials — Save Materials to a file.

Synopsis

OOF.File.Save.Materials(filename,mode,format,materials)

Details

  • Parent Menu: OOF.File.Save
  • Callback: function saveMaterials in module ooflib.engine.IO.materialmenu
  • Options: disabled=1
  • Parameters:

    filename
    Name of the file. Type: A character string.
    mode
    'w' to (over)write, 'a' to append. Type: An object from the WriteMode enumerated class.
    format
    Format of the file. Type: An object from the DataFileFormat enumerated class.
    materials
    Material(s) to be saved. Type: A list of character strings.

Description

Save the definitions of one or more Materials in a data file. All of the Properties used in the Materials will be saved as well.

The format is one of the data file formats discussed in Section 2.6. The materials parameter is a Python list of names of Materials, e.g, ['granite', 'schist', 'pumice'].