Class: QgsLightSource¶
- class qgis._3d.QgsLightSource¶
Bases:
sip.wrapper
Base class for light sources in 3d scenes.
New in version 3.26:
Methods
Returns a copy of the light source.
Creates a new light source from an XML element.
Reads configuration from a DOM element previously written using
writeXml()
.After reading from XML, resolve references to any layers that have been read as layer IDs.
Returns the light source type.
Writes the light source's configuration to a new DOM element and returns it.
- clone(self) QgsLightSource ¶
Returns a copy of the light source.
- Return type:
- createFromXml(element: QDomElement, context: QgsReadWriteContext) QgsLightSource ¶
Creates a new light source from an XML element.
- Parameters:
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type:
- readXml(self, elem: QDomElement, context: QgsReadWriteContext = QgsReadWriteContext())¶
Reads configuration from a DOM element previously written using
writeXml()
.See also
- Parameters:
elem (QDomElement) –
context (
QgsReadWriteContext
= QgsReadWriteContext()) –
- resolveReferences(self, project: QgsProject)¶
After reading from XML, resolve references to any layers that have been read as layer IDs.
- Parameters:
project (QgsProject) –
- type(self) Qgis.LightSourceType ¶
Returns the light source type.
- Return type:
- writeXml(self, doc: QDomDocument, context: QgsReadWriteContext = QgsReadWriteContext()) QDomElement ¶
Writes the light source’s configuration to a new DOM element and returns it.
See also
- Parameters:
doc (QDomDocument) –
context (
QgsReadWriteContext
= QgsReadWriteContext()) –
- Return type:
QDomElement