MaterialGroup

class MaterialGroup
property id

The id of the group.

Type

str, read-only

property name

The name of the group.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

list_materials()

List the materials of this group.

Returns

The list of materials in the group.

Return type

list(Material)

duplicate()

Duplicate this material group.

Returns

The duplicated group.

Return type

MaterialGroup

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), use force to force deletion of non empty groups.

Parameters

force (bool) -- Force the deletion of the group even if it contains materials.

Raises
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

StandardMaterial

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

MultiLayerMaterial

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

MirrorMaterial

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

MatteMaterial

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

EnvMaterial

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

Material

Raises