Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dced5dc43f | ||
|
|
711c9d2ed4 |
@@ -127,10 +127,10 @@ class LoadImagesFromDirInpaint(LoadImagesInpaint):
|
||||
return {
|
||||
"required": {
|
||||
"sequence_id": ("STRING", {"frames_upload": True}),
|
||||
},
|
||||
"optional": {
|
||||
"start_index": ("INT", {"default": 0, "min": 0, "step": 1}),
|
||||
"end_index": ("INT", {"default": 0, "min": 0, "step": 1}),
|
||||
},
|
||||
"optional": {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,10 +141,10 @@ class LoadImagesFromFileInpaint(LoadImagesInpaint):
|
||||
return {
|
||||
"required": {
|
||||
"sequence_id": ("STRING", {"video_upload": True}),
|
||||
},
|
||||
"optional": {
|
||||
"start_index": ("INT", {"default": 0, "min": 0, "step": 1}),
|
||||
"end_index": ("INT", {"default": 0, "min": 0, "step": 1}),
|
||||
},
|
||||
"optional": {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-25
@@ -306,11 +306,7 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
|
||||
var fillModeButton = this.createLeftButton("✨",
|
||||
(ev) => {
|
||||
this.changeFillMode(ev.target, this.fillModeNum ? 1 : 0);
|
||||
});
|
||||
var paintModeButton = this.createLeftButton("□",
|
||||
(ev) => {
|
||||
this.changeFillMode(ev.target, 2);
|
||||
this.changeFillMode(ev.target);
|
||||
});
|
||||
var prevButton = this.createLeftButton("<", () => this.moveToPrev());
|
||||
var nextButton = this.createLeftButton(">", () => this.moveToNext());
|
||||
@@ -393,7 +389,7 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
|
||||
this.is_layout_created = true;
|
||||
this.is_sketch = false;
|
||||
this.fillModeNum = 0;
|
||||
this.is_magicWand = false;
|
||||
|
||||
// replacement of onClose hook since close is not real close
|
||||
const self = this;
|
||||
@@ -643,7 +639,7 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
const x = event.offsetX || event.targetTouches[0].clientX - maskRect.left;
|
||||
const y = event.offsetY || event.targetTouches[0].clientY - maskRect.top;
|
||||
|
||||
if (this.fillModeNum == 1) {
|
||||
if (this.is_magicWand) {
|
||||
if ((window.TouchEvent && event instanceof TouchEvent || event.buttons == 1)
|
||||
|| (event.buttons == 2 || event.buttons == 5 || event.buttons == 32)) {
|
||||
|
||||
@@ -660,7 +656,7 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
}
|
||||
}
|
||||
|
||||
} else if (this.fillModeNum == 0) {
|
||||
} else {
|
||||
if (window.TouchEvent && event instanceof TouchEvent || event.buttons == 1) {
|
||||
var diff = performance.now() - self.lasttime;
|
||||
|
||||
@@ -759,18 +755,13 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
|
||||
self.lasttime = performance.now();
|
||||
}
|
||||
} else if (this.fillModeNum == 2) {
|
||||
if (window.TouchEvent && event instanceof TouchEvent || event.buttons == 1) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
handlePointerDown(self, event) {
|
||||
this.stackBeforeCanvas();
|
||||
|
||||
if (this.fillModeNum == 1) {
|
||||
if (this.is_magicWand) {
|
||||
if ([0, 2, 5].includes(event.button)) {
|
||||
self.drawing_mode = true;
|
||||
|
||||
@@ -793,7 +784,7 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
self.lasttime = performance.now();
|
||||
}
|
||||
|
||||
} else if (this.fillModeNum == 0) {
|
||||
} else {
|
||||
var brush_size = this.brush_size;
|
||||
if(event instanceof PointerEvent && event.pointerType == 'pen') {
|
||||
brush_size *= event.pressure;
|
||||
@@ -821,8 +812,6 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
self.lasty = y;
|
||||
self.lasttime = performance.now();
|
||||
}
|
||||
} else if (this.fillModeNum == 2) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,18 +856,15 @@ class MaskEditorDialog extends ComfyDialog {
|
||||
this.beforeCanvases.push(deactivatedCvs);
|
||||
}
|
||||
|
||||
changeFillMode(button, num) {
|
||||
if (num == 0) {
|
||||
changeFillMode(button) {
|
||||
if (this.is_magicWand) {
|
||||
button.innerText = "✨";
|
||||
this.fillModeNum = 0;
|
||||
} else if (num == 1) {
|
||||
|
||||
} else {
|
||||
button.innerText = "🖌";
|
||||
this.fillModeNum = 1;
|
||||
} else if (num == 2) {
|
||||
//button.innerText = "🖌";
|
||||
this.fillModeNum = 2;
|
||||
}
|
||||
|
||||
this.is_magicWand = !this.is_magicWand;
|
||||
}
|
||||
|
||||
getBackCanvasForCurrentMode(index) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-seqimageloader"
|
||||
description = "This is an extension node for ComfyUI that allows you to load frames from a video in bulk and perform masking and sketching on each frame through a GUI."
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
license = { file = "LICENSE.txt" }
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user