Class: QgsMaterialRegistry¶
Registry of available 3d material settings classes.
QgsMaterialRegistry
is not usually directly created, but
rather accessed through Qgs3D.materialRegistry().
Added 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. |
- class qgis._3d.QgsMaterialRegistry[source]¶
Bases:
object
- addMaterialSettingsType(self, metadata: QgsMaterialSettingsAbstractMetadata | None) bool [source]¶
Registers a new material settings type. Takes ownership of the
metadata
instance.- Parameters:
metadata (Optional[QgsMaterialSettingsAbstractMetadata])
- Return type:
bool
- createMaterialSettings(self, type: str | None) QgsAbstractMaterialSettings | None [source]¶
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 (Optional[str])
- Return type:
Optional[QgsAbstractMaterialSettings]
- materialSettingsMetadata(self, type: str | None) QgsMaterialSettingsAbstractMetadata | None [source]¶
Returns metadata for specified material settings
type
. ReturnsNone
if not found- Parameters:
type (Optional[str])
- Return type:
Optional[QgsMaterialSettingsAbstractMetadata]