Class: QgsMetalRoughMaterialSettings

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.

Class Hierarchy

Inheritance diagram of qgis._3d.QgsMetalRoughMaterialSettings

Base classes

QgsAbstractMaterialSettings

Abstract base class for material settings.

class qgis._3d.QgsMetalRoughMaterialSettings[source]

Bases: QgsAbstractMaterialSettings

baseColor(self) QColor[source]

Returns the base material color.

See also

setBaseColor()

Return type:

QColor

static create() QgsAbstractMaterialSettings | None[source]

Returns a new instance of QgsMetalRoughMaterialSettings.

Return type:

Optional[QgsAbstractMaterialSettings]

metalness(self) float[source]

Returns the material’s metalness.

See also

setMetalness()

Return type:

float

roughness(self) float[source]

Returns the material’s roughness.

See also

setRoughness()

Return type:

float

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

Sets the base material color.

See also

baseColor()

Parameters:

color (Union[QColor, Qt.GlobalColor])

setMetalness(self, metalness: float)[source]

Returns the material’s metalness.

See also

metalness()

Parameters:

metalness (float)

setRoughness(self, roughness: float)[source]

Returns the material’s roughness.

See also

roughness()

Parameters:

roughness (float)

static supportsTechnique(technique: QgsMaterialSettingsRenderingTechnique) bool[source]

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

Parameters:

technique (QgsMaterialSettingsRenderingTechnique)

Return type:

bool

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

Dict[str, str]