Add mask editor integration to canvas workflow

Introduces the ability to open the current canvas in a mask editor, upload and retrieve mask edits, and apply them to the mask layer. Adds utility functions for mask editor state detection and control, a new 'Edit Mask' button in the UI, and methods for handling mask updates and preview refresh. Also adds a setMask method to MaskTool for precise mask placement.
This commit is contained in:
Dariusz L
2025-06-29 04:15:45 +02:00
parent fc8ebedb1e
commit 7a7c8f2295
5 changed files with 245 additions and 0 deletions

View File

@@ -761,6 +761,13 @@ async function createCanvasWidget(node, widget, app) {
]),
$el("div.painter-separator"),
$el("div.painter-button-group", {id: "mask-controls"}, [
$el("button.painter-button", {
textContent: "Edit Mask",
title: "Open the current canvas view in the mask editor",
onclick: () => {
canvas.startMaskEditor();
}
}),
$el("button.painter-button", {
id: "mask-mode-btn",
textContent: "Draw Mask",