import bpy from .mask import EditImageMask class ImagePolylineTool(bpy.types.WorkSpaceTool): bl_space_type = "VIEW_3D" bl_context_mode = "OBJECT" bl_idname = "anyimage.image_polyline" bl_label = "Image Polyline" bl_description = "Edit an Image Empty with a clicked polygon mask" bl_icon = "ops.sculpt.polyline_mask" bl_operator = EditImageMask.bl_idname bl_keymap = ( ( EditImageMask.bl_idname, {"type": "LEFTMOUSE", "value": "PRESS"}, {"properties": [("gesture", "POLYLINE")]}, ), )