Hi Abdelghani,

You should be able to achieve that by setting the project's terrain:
```
p=QgsRasterDemTerrainProvider()
p.setLayer(dem_layer)
QgsProject.instance().elevationProperties().setTerrainProvider(p)
```
This should get your dem_layer as a terrain for any new 3d views.
I don't think the API to change the 3d views' terrain is exposed to python
yet.

Best
Stefanos
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to