Class: QgsAbstractMaterialSettings

Abstract base class for material settings.

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.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: clone(), equals(), type()

Class Hierarchy

Inheritance diagram of qgis._3d.QgsAbstractMaterialSettings

Subclasses

QgsGoochMaterialSettings

Basic shading material used for rendering based on the Phong shading model with three color components: ambient, diffuse and specular.

QgsMetalRoughMaterialSettings

A PBR metal rough shading material used for rendering.

QgsNullMaterialSettings

Null shading material used for rendering models and scenes with native textures.

QgsPhongMaterialSettings

Basic shading material used for rendering based on the Phong shading model with three color components: ambient, diffuse and specular.

QgsPhongTexturedMaterialSettings

A Phong shading model with diffuse texture map.

QgsSimpleLineMaterialSettings

Basic shading material used for rendering simple lines as solid line components.

Enums

RenderingTechnique

alias of QgsMaterialSettingsRenderingTechnique

Abstract Methods

clone

Clones the material settings.

equals

Returns True if this settings exactly matches an other settings.

type

Returns the unique type name for the material.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsAbstractMaterialSettings. See the FAQ for more details.

readXml

Reads settings from a DOM element

writeXml

Writes settings to a DOM element

class qgis._3d.QgsAbstractMaterialSettings[source]

Bases: object

RenderingTechnique

alias of QgsMaterialSettingsRenderingTechnique

abstract clone(self) QgsAbstractMaterialSettings | None[source]

Clones the material settings.

Caller takes ownership of the returned object.

Return type:

Optional[QgsAbstractMaterialSettings]

abstract equals(self, other: QgsAbstractMaterialSettings | None) bool[source]

Returns True if this settings exactly matches an other settings.

Added in version 3.42.

Parameters:

other (Optional[QgsAbstractMaterialSettings])

Return type:

bool

virtual readXml(self, element: QDomElement, a1: QgsReadWriteContext)[source]

Reads settings from a DOM element

Parameters:
abstract type(self) str[source]

Returns the unique type name for the material.

Return type:

str

virtual writeXml(self, element: QDomElement, a1: QgsReadWriteContext)[source]

Writes settings to a DOM element

Parameters: