While trying to import a 3D class in a python script, I found out that the code in the pyqgis docs is not working (for me):

from qgis.3d import QgsLayoutItem3DMap


Instead I need to add an underscore for the 3d module name:

from qgis._3d import QgsLayoutItem3DMap



Should this be fixed in the documentation? I'm not all sure, cause when trying to fix it, I found this related commit:

https://github.com/qgis/pyqgis/commit/1ac564790aa0b7abbd003c04d07358d8e4f14493



This is the page in the docs:
https://qgis.org/pyqgis/master/3d/QgsLayoutItem3DMap.html


Should I make an issue? It took me a while to figure out that _3d solution.

Cheers,
Raymond
_______________________________________________
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