My goal is to import a .shp file into blender within my python script. I found the add-on BlenderGIS that offers this functionality. I can add the add-on to blender make it work "manually", but I want to call the import function from a python script.
I am new to Blender and I cannot find what the right way is to import a add-on/BlenderGIS into a python script.
Among other things, I tried the following:
import bpy
import sys
import os
dir = os.path.dirname(bpy.data.filepath)
if not dir in sys.path:
sys.path.append(dir )
import io_shapefile
file = "path/to/file.shp"
bpy.ops.importgis(file)
This gives the error:
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
TypeError: 'BPyOpsSubMod' object is not callable
Can someone point me in the right direction on how to import a .shp from a python script?
Thanks in advance