import bpy from bpy.props import StringProperty from bpy_extras.io_utils import ImportHelper class OBJECT_OT_select_geotiff_file(bpy.types.Operator, ImportHelper): """Display dialog to a GeoTIFF file for Mapping Tools to use.""" bl_idname = "object.select_geotiff_file" bl_label = "Select GeoTIFF file" filter_glob: StringProperty(default="*.tif;*.tiff", options={"HIDDEN"}) filepath: StringProperty(subtype="FILE_PATH") def execute(self, context): context.scene.mapping_extension_geotiff_filename=self.properties.filepath return {'FINISHED'}