Class: Qgs3DRendererCategory

Represents an individual category (class) from a QgsCategorized3DRenderer.

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

Constructor

__init__

Methods

renderState

Returns True if the category is currently enabled and should be rendered.

setRenderState

Sets whether the category is currently enabled and should be rendered.

setSymbol

Sets the symbol which will be used to render this category.

setValue

Sets the value corresponding to this category.

symbol

Returns the symbol which will be used to render this category.

value

Returns the value corresponding to this category.

class qgis._3d.Qgs3DRendererCategory[source]

Bases: object

__init__()
__init__(value: Any, symbol: QgsAbstract3DSymbol | None, render: bool = True)

Constructor for a new QgsRendererCategory, with the specified value and symbol.

If value is a list, then the category will match any of the values from this list.

The ownership of symbol is transferred to the category.

The render argument indicates whether the category should initially be rendered and appear checked in the layer tree.

Parameters:
__init__(other: Qgs3DRendererCategory)
Parameters:

other (Qgs3DRendererCategory)

renderState(self) bool[source]

Returns True if the category is currently enabled and should be rendered.

See also

setRenderState()

Return type:

bool

setRenderState(self, render: bool)[source]

Sets whether the category is currently enabled and should be rendered.

See also

renderState()

Parameters:

render (bool)

setSymbol(self, symbol: QgsAbstract3DSymbol | None)[source]

Sets the symbol which will be used to render this category.

Ownership of the symbol is transferred to the category.

See also

symbol()

Parameters:

symbol (Optional[QgsAbstract3DSymbol])

setValue(self, value: Any)[source]

Sets the value corresponding to this category.

If value is a list, then the category will match any of the values from this list.

See also

value()

Parameters:

value (Any)

symbol(self) QgsAbstract3DSymbol | None[source]

Returns the symbol which will be used to render this category.

See also

setSymbol()

Return type:

Optional[QgsAbstract3DSymbol]

value(self) Any[source]

Returns the value corresponding to this category.

If the returned value is a list, then the category will match any of the values from this list.

See also

setValue()

Return type:

Any