Add image perspective editing and related tools
- Implemented the Image Perspective tool for editing image corners in Blender. - Created a new operator `EditImagePerspective` to handle the perspective transformation. - Added a preview feature for the perspective adjustment. - Introduced the `ImagePolylineTool` for editing image masks with polylines. - Developed backend support for Real-ESRGAN model inference, including ONNX integration. - Added functionality for image masking and background removal. - Created unit tests for the Real-ESRGAN ONNX model to ensure correct preprocessing and inference.
This commit is contained in:
20
src/anyimage/operators/image_edit/polyline.py
Normal file
20
src/anyimage/operators/image_edit/polyline.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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")]},
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user