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().New in version 3.16:
Methods
Registers a new material settings type.
Creates a new instance of the material settings of the specified
type
.Returns metadata for specified material settings
type
.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
- materialSettingsMetadata(self, type: str) QgsMaterialSettingsAbstractMetadata ¶
Returns metadata for specified material settings
type
. ReturnsNone
if not found- Parameters
type (str) –
- Return type
- materialSettingsTypes(self) List[str] ¶
Returns a list of all available material settings types.
- Return type
List[str]