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. |
Methods
Returns the base material color. |
|
Returns the material's metalness, as a value between 0 and 1. |
|
Returns the material's roughness, as a value between 0 and 1. |
|
Sets the base material color. |
|
Sets the material's metalness, as a value between 0 and 1. |
|
Sets the material's roughness, as a value between 0 and 1. |
Static Methods
Returns a new instance of QgsMetalRoughMaterialSettings. |
|
Returns |
- class qgis._3d.QgsMetalRoughMaterialSettings¶
Bases:
QgsAbstractMaterialSettings- baseColor(self) QColor¶
Returns the base material color.
See also
- Return type:
QColor
- static create() QgsAbstractMaterialSettings | None¶
Returns a new instance of QgsMetalRoughMaterialSettings.
- Return type:
- metalness(self) float¶
Returns the material’s metalness, as a value between 0 and 1.
See also
- Return type:
float
- roughness(self) float¶
Returns the material’s roughness, as a value between 0 and 1.
See also
- Return type:
float
- setBaseColor(self, color: QColor | Qt.GlobalColor | int)¶
Sets the base material
color.See also
- 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
- Parameters:
metalness (float)
- setRoughness(self, roughness: float)¶
Sets the material’s
roughness, as a value between 0 and 1.See also
- Parameters:
roughness (float)
- static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool¶
Returns
Trueif the specifiedtechniqueis supported by the metal rough material.- Parameters:
technique (Qgis.MaterialRenderingTechnique)
- Return type:
bool