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¶
Base classes¶
Abstract base class for material settings. |
Abstract Methods
Returns an approximate color representing the blended material color. |
|
Decomposes a base color into the material's color components, and sets the material's color accordingly. |
Methods
Returns the base material color. |
|
Returns the material's emissive color. |
|
Returns the emission factor, which dictates the strength of the emission effect. |
|
Returns the material's metalness, as a value between 0 and 1. |
|
Returns the opacity of the surface |
|
Returns the material's roughness, as a value between 0 and 1. |
|
Sets the base material color. |
|
Sets the material's emissive color. |
|
Sets the emission factor, which dictates the strength of the emission effect. |
|
Sets the material's metalness, as a value between 0 and 1. |
|
Sets the opacity of the surface. |
|
Sets the material's roughness, as a value between 0 and 1. |
Static Methods
Returns a new instance of QgsMetalRoughMaterialSettings. |
|
Returns |
- class qgis.core.QgsMetalRoughMaterialSettings[source]¶
Bases:
QgsAbstractMaterialSettings- abstract averageColor(self) QColor[source]¶
Returns an approximate color representing the blended material color.
Since this material contains only a single color, this function simply returns
baseColor().See also
Added in version 4.2.
- Return type:
QColor
- static create() QgsAbstractMaterialSettings | None[source]¶
Returns a new instance of QgsMetalRoughMaterialSettings.
- Return type:
- emissionColor(self) QColor[source]¶
Returns the material’s emissive color.
See also
Added in version 4.2.
- Return type:
QColor
- emissionFactor(self) float[source]¶
Returns the emission factor, which dictates the strength of the emission effect.
A value of 1.0 indicates that the emission color values should be used directly. Larger values result in more light emission.
See also
See also
Added in version 4.2.
- Return type:
float
- metalness(self) float[source]¶
Returns the material’s metalness, as a value between 0 and 1.
See also
- Return type:
float
- opacity(self) float[source]¶
Returns the opacity of the surface
See also
Added in version 4.2.
- Return type:
float
- roughness(self) float[source]¶
Returns the material’s roughness, as a value between 0 and 1.
See also
- Return type:
float
- setBaseColor(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the base material
color.See also
- Parameters:
color (Union[QColor, Qt.GlobalColor, int])
- abstract setColorsFromBase(self, baseColor: QColor | Qt.GlobalColor | int)[source]¶
Decomposes a base color into the material’s color components, and sets the material’s color accordingly.
Since this material contains only a single color, this function is equivalent to calling setBaseColor(baseColor).
- Parameters:
baseColor (Union[QColor, Qt.GlobalColor, int]) – The color to decompose
See also
Added in version 4.2.
- setEmissionColor(self, color: QColor | Qt.GlobalColor | int)[source]¶
Sets the material’s emissive
color.See also
Added in version 4.2.
- Parameters:
color (Union[QColor, Qt.GlobalColor, int])
- setEmissionFactor(self, factor: float)[source]¶
Sets the emission
factor, which dictates the strength of the emission effect.A value of 1.0 indicates that the emission color values should be used directly. Larger values result in more light emission.
See also
See also
Added in version 4.2.
- Parameters:
factor (float)
- setMetalness(self, metalness: float)[source]¶
Sets the material’s
metalness, as a value between 0 and 1.See also
- Parameters:
metalness (float)
- setOpacity(self, opacity: float)[source]¶
Sets the
opacityof the surface.See also
Added in version 4.2.
- Parameters:
opacity (float)
- setRoughness(self, roughness: float)[source]¶
Sets the material’s
roughness, as a value between 0 and 1.See also
- Parameters:
roughness (float)
- static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool[source]¶
Returns
Trueif the specifiedtechniqueis supported by the metal rough material.- Parameters:
technique (Qgis.MaterialRenderingTechnique)
- Return type:
bool