Class: QgsMaterialContext

class qgis._3d.QgsMaterialContext

Bases: sip.wrapper

Context settings for a material.

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.

New in version 3.16:

Methods

isSelected

Returns True if the material should represent a selected state.

selectionColor

Returns the color for representing materials in a selected state.

setIsSelected

Sets whether the material should represent a selected state.

setSelectionColor

Sets the color for representing materials in a selected state.

isSelected(self) bool

Returns True if the material should represent a selected state.

See also

setIsSelected()

Return type:

bool

selectionColor(self) QColor

Returns the color for representing materials in a selected state.

Return type:

QColor

setIsSelected(self, isSelected: bool)

Sets whether the material should represent a selected state.

See also

isSelected()

Parameters:

isSelected (bool) –

setSelectionColor(self, color: QColor | Qt.GlobalColor)

Sets the color for representing materials in a selected state.

See also

selectionColor()

Parameters:

color (Union[QColor) –