MaterialGroup¶
-
class
MaterialGroup¶ -
-
property
name¶ The name of the group.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
Databaseis in read only mode.
-
remove(force = False)¶ Delete a material group
Note
By default, only empty groups can be deleted (
NotEmptyErroris raised otherwise), useforceto force deletion of non empty groups.- Parameters
force (bool) -- Force the deletion of the group even if it contains materials.
- Raises
NotEmptyError -- If
forceisFalseand the group contains materials.ReadOnlyError -- If
Databaseis 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
Databaseis 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
Databaseis 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
Databaseis 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
Databaseis 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
Databaseis 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
filenamecan't be opened.ReadOnlyError -- If
Databaseis in read only mode.
-
property