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._3d.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._3d.QgsMetalRoughMaterialSettings

Bases: QgsAbstractMaterialSettings

baseColor(self) QColor

Returns the base material color.

See also

setBaseColor()

Return type:

QColor

static create() QgsAbstractMaterialSettings | None

Returns a new instance of QgsMetalRoughMaterialSettings.

Return type:

Optional[QgsAbstractMaterialSettings]

metalness(self) float

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

See also

setMetalness()

Return type:

float

roughness(self) float

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)

Sets the base material color.

See also

baseColor()

Parameters:

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

setMetalness(self, metalness: float)

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

See also

metalness()

Parameters:

metalness (float)

setRoughness(self, roughness: float)

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

See also

roughness()

Parameters:

roughness (float)

static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool

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

Parameters:

technique (Qgis.MaterialRenderingTechnique)

Return type:

bool