Class: QgsMetalRoughMaterialSettings¶
- class qgis._3d.QgsMetalRoughMaterialSettings¶
Bases:
qgis._3d.QgsAbstractMaterialSettings
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.
QgsMetalRoughMaterialSettings() Constructor for QgsMetalRoughMaterialSettings.
QgsMetalRoughMaterialSettings(
QgsMetalRoughMaterialSettings
)Methods
Returns the base material color.
- rtype:
QgsMetalRoughMaterialSettings
Returns a new instance of QgsMetalRoughMaterialSettings.
Returns the material's metalness.
- param elem:
Returns the material's roughness.
Sets the base material
color
.Returns the material's
metalness
.Returns the material's
roughness
.Returns
True
if the specifiedtechnique
is supported by the metal rough material.- rtype:
Dict[str, str]
- rtype:
str
- param elem:
- baseColor(self) QColor ¶
Returns the base material color.
See also
- Return type:
QColor
- clone(self) QgsMetalRoughMaterialSettings ¶
- Return type:
- create() QgsAbstractMaterialSettings ¶
Returns a new instance of QgsMetalRoughMaterialSettings.
- Return type:
- metalness(self) float ¶
Returns the material’s metalness.
See also
- Return type:
float
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement)
context (QgsReadWriteContext)
- roughness(self) float ¶
Returns the material’s roughness.
See also
- Return type:
float
- setBaseColor(self, color: QColor | Qt.GlobalColor)¶
Sets the base material
color
.See also
- Parameters:
color (Union[QColor)
- setMetalness(self, metalness: float)¶
Returns the material’s
metalness
.See also
- Parameters:
metalness (float)
- setRoughness(self, roughness: float)¶
Returns the material’s
roughness
.See also
- Parameters:
roughness (float)
- supportsTechnique(technique: QgsMaterialSettingsRenderingTechnique) bool ¶
Returns
True
if the specifiedtechnique
is supported by the metal rough material.- Parameters:
technique (QgsMaterialSettingsRenderingTechnique)
- Return type:
bool
- toExportParameters(self) Dict[str, str] ¶
- Return type:
Dict[str, str]
- type(self) str ¶
- Return type:
str
- writeXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement)
context (QgsReadWriteContext)