Class: QgsMaterialContext

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.

Added 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.

class qgis._3d.QgsMaterialContext[source]

Bases: object

isSelected(self) bool[source]

Returns True if the material should represent a selected state.

See also

setIsSelected()

Return type:

bool

selectionColor(self) QColor[source]

Returns the color for representing materials in a selected state.

Return type:

QColor

setIsSelected(self, isSelected: bool)[source]

Sets whether the material should represent a selected state.

See also

isSelected()

Parameters:

isSelected (bool)

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

Sets the color for representing materials in a selected state.

See also

selectionColor()

Parameters:

color (Union[QColor, Qt.GlobalColor])