Can't script with python so we can export a map without pressing 'E' key. The aim of the script would be to add elevation data to the previously extracted map and create an STL file from them. This last part works but I can't use the bpy.ops.view3d.map_start() func. in script since this raises a poll error.
It would be awesome to have a function taking a bbox and a city name as parameters so we can automatically load a wanted geographic zone.
Traceback (most recent call last):
File "/home/$USER/Documents/script_test.blend/scr.py", line 16, in <module>
#Geograghic zone to load
File "/usr/share/blender/2.92/scripts/modules/bpy/ops.py", line 132, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
File "/home/$USER/.config/blender/2.92/scripts/addons/BlenderGIS-master/operators/view3d_mapviewer.py", line 541, in execute
bpy.ops.view3d.map_viewer('INVOKE_DEFAULT', srckey=self.src, laykey=self.lay, grdkey=self.grd, recenter=self.recenter)
File "/usr/share/blender/2.92/scripts/modules/bpy/ops.py", line 130, in __call__
ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Operator bpy.ops.view3d.map_viewer.poll() failed, context is incorrect
location: /usr/share/blender/2.92/scripts/modules/bpy/ops.py:132
Error: Python script failed, check the message in the system console
Blender and OS versions
2.92.0 - Ubuntu 20.04.1
Describe the bug
Can't script with python so we can export a map without pressing 'E' key. The aim of the script would be to add elevation data to the previously extracted map and create an STL file from them. This last part works but I can't use the
bpy.ops.view3d.map_start()
func. in script since this raises apoll
error.It would be awesome to have a function taking a bbox and a city name as parameters so we can automatically load a wanted geographic zone.
How to Reproduce
Error message