[QGIS-Developer] import 3d or _3d in python?
Raymond Nijssen
r.nijssen at terglobo.nl
Mon Oct 3 00:19:27 PDT 2022
Hi Andrea,
I know, but my script is not running in the console. It is part of a
plugin, so I need to do the import. Would be handy if the documentation
tells me how to do it.
Kind regards,
Raymond
On 03-10-2022 09:02, Andrea Giudiceandrea via QGIS-Developer wrote:
> Il 03/10/2022 08:57, Raymond Nijssen via QGIS-Developer ha scritto:
>>
>> Instead I need to add an underscore for the 3d module name:
>>
>> from qgis._3d import QgsLayoutItem3DMap
>
> In the Python console, the 3d library is automatically imported (if QGIS
> is compiled with 3d support) with:
>
> from qgis._3d import *
>
> See:
> https://github.com/qgis/QGIS/blob/95e00c50d219b39b2571dd6bff59a1393deb9b6a/python/console/console_sci.py#L59
>
>
> Best regards.
>
> Andrea Giudiceandrea
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the QGIS-Developer
mailing list