Class: QgsMaterialRegistry

class qgis.3d.QgsMaterialRegistry

Bases: sip.wrapper

Registry of available 3d material settings classes.

QgsMaterialRegistry is not usually directly created, but rather accessed through Qgs3D.materialRegistry().

Methods

addMaterialSettingsType

Registers a new material settings type.

createMaterialSettings

Creates a new instance of the material settings of the specified type.

materialSettingsMetadata

Returns metadata for specified material settings type.

materialSettingsTypes

Returns a list of all available material settings types.

addMaterialSettingsType(self, metadata: QgsMaterialSettingsAbstractMetadata) → bool

Registers a new material settings type. Takes ownership of the metadata instance.

Parameters

metadata (QgsMaterialSettingsAbstractMetadata) –

Return type

bool

createMaterialSettings(self, type: str)QgsAbstractMaterialSettings

Creates a new instance of the material settings of the specified type.

The caller takes ownership of the returned object.

Returns None if the specified type is not found in the registry.

Parameters

type (str) –

Return type

QgsAbstractMaterialSettings

materialSettingsMetadata(self, type: str)QgsMaterialSettingsAbstractMetadata

Returns metadata for specified material settings type. Returns None if not found

Parameters

type (str) –

Return type

QgsMaterialSettingsAbstractMetadata

materialSettingsTypes(self) → List[str]

Returns a list of all available material settings types.

Return type

List[str]