MaterialGroup
- class MaterialGroup
-
- property name
The name of the group.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- list_materials()
List the materials of this group.
- duplicate()
Duplicate this material group.
- Returns
The duplicated group.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- remove(force=False)
Delete a material group
Note
By default, only empty groups can be deleted (
NotEmptyError
is raised otherwise), useforce
to force deletion of non empty groups.- Parameters
force (bool) -- Force the deletion of the group even if it contains materials.
- Raises
NotEmptyError -- If
force
isFalse
and the group contains materials.ReadOnlyError -- If
Database
is in read only mode.
- create_standard_material(name)
Create a new standard material.
- Parameters
name (str) -- The name of the new material.
- Returns
The newly created material.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- create_multi_layer_material(name)
Create a new multi layer material.
- Parameters
name (str) -- The name of the new material.
- Returns
The newly created material.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- create_mirror_material(name)
Create a new mirror material.
- Parameters
name (str) -- The name of the new material.
- Returns
The newly created material.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- create_matte_material(name)
Create a new matte material.
- Parameters
name (str) -- The name of the new material.
- Returns
The newly created material.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- create_env_material(name)
Create a new environment material.
- Parameters
name (str) -- The name of the new material.
- Returns
The newly created material.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- import_kmt(filename)
Import material from a KMT file.
- Parameters
filename (str) -- KMT filename.
- Returns
The imported material.
- Return type
- Raises
FileNotFoundError -- If
filename
can't be opened.ReadOnlyError -- If
Database
is in read only mode.