Class: QgsMetalRoughMaterialSettings

class qgis._3d.QgsMetalRoughMaterialSettings

Bases: qgis._3d.QgsAbstractMaterialSettings

A PBR metal rough shading material used for rendering.

Warning

This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.

Added in version 3.36.

QgsMetalRoughMaterialSettings() Constructor for QgsMetalRoughMaterialSettings.

QgsMetalRoughMaterialSettings(QgsMetalRoughMaterialSettings)

Methods

baseColor

Returns the base material color.

clone

rtype:

QgsMetalRoughMaterialSettings

create

Returns a new instance of QgsMetalRoughMaterialSettings.

metalness

Returns the material's metalness.

readXml

param elem:

roughness

Returns the material's roughness.

setBaseColor

Sets the base material color.

setMetalness

Returns the material's metalness.

setRoughness

Returns the material's roughness.

supportsTechnique

Returns True if the specified technique is supported by the metal rough material.

toExportParameters

rtype:

Dict[str, str]

type

rtype:

str

writeXml

param elem:

baseColor(self) QColor

Returns the base material color.

See also

setBaseColor()

Return type:

QColor

clone(self) QgsMetalRoughMaterialSettings
Return type:

QgsMetalRoughMaterialSettings

create() QgsAbstractMaterialSettings

Returns a new instance of QgsMetalRoughMaterialSettings.

Return type:

QgsAbstractMaterialSettings

metalness(self) float

Returns the material’s metalness.

See also

setMetalness()

Return type:

float

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters:
roughness(self) float

Returns the material’s roughness.

See also

setRoughness()

Return type:

float

setBaseColor(self, color: QColor | Qt.GlobalColor)

Sets the base material color.

See also

baseColor()

Parameters:

color (Union[QColor)

setMetalness(self, metalness: float)

Returns the material’s metalness.

See also

metalness()

Parameters:

metalness (float)

setRoughness(self, roughness: float)

Returns the material’s roughness.

See also

roughness()

Parameters:

roughness (float)

supportsTechnique(technique: QgsMaterialSettingsRenderingTechnique) bool

Returns True if the specified technique is supported by the metal rough material.

Parameters:

technique (QgsMaterialSettingsRenderingTechnique)

Return type:

bool

toExportParameters(self) Dict[str, str]
Return type:

Dict[str, str]

type(self) str
Return type:

str

writeXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters: