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.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsMetalRoughMaterialSettings

Base classes

QgsAbstractMaterialSettings

Abstract base class for material settings.

Methods

baseColor

Returns the base material color.

metalness

Returns the material's metalness, as a value between 0 and 1.

roughness

Returns the material's roughness, as a value between 0 and 1.

setBaseColor

Sets the base material color.

setMetalness

Sets the material's metalness, as a value between 0 and 1.

setRoughness

Sets the material's roughness, as a value between 0 and 1.

Static Methods

create

Returns a new instance of QgsMetalRoughMaterialSettings.

supportsTechnique

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

class qgis.core.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, as a value between 0 and 1.

See also

setMetalness()

Return type:

float

roughness(self) float[source]

Returns the material’s roughness, as a value between 0 and 1.

See also

setRoughness()

Return type:

float

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

Sets the base material color.

See also

baseColor()

Parameters:

color (Union[QColor, Qt.GlobalColor, int])

setMetalness(self, metalness: float)[source]

Sets the material’s metalness, as a value between 0 and 1.

See also

metalness()

Parameters:

metalness (float)

setRoughness(self, roughness: float)[source]

Sets the material’s roughness, as a value between 0 and 1.

See also

roughness()

Parameters:

roughness (float)

static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool[source]

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

Parameters:

technique (Qgis.MaterialRenderingTechnique)

Return type:

bool