register

dnois.mt.register(material: Material, exist_ok: bool = False)

Add a new class of material into material library.

Parameters:
  • material (Material) – The material instance.

  • exist_ok (bool) – If False, raise KeyError if the material already exists. Otherwise, overwrite the existing material. Default: False.