InpaintRegionEditor Dev
e12f5c5cdb
release: v1.4.0 - 添加文档、截图、示例工作流
...
- README.md: 英文版文档
- README_CN.md: 中文版文档
- images/: 节点截图和工作流截图
- workflow.json: 示例工作流
- 移除 Open in MaskEditor 右键菜单选项(系统自带已恢复正常)
2026-03-04 09:19:42 +08:00
InpaintRegionEditor Dev
107e992cfe
docs: 更新文档,准备发布 v1.4
...
- README: 移除开发中标记,更新功能列表
- CHANGELOG: 添加 v1.4.0 版本记录
- HANDOFF: 更新版本历史
- gitignore: 添加 *.bak 排除临时备份
- 代码注释: 掏窟窿 -> 透明区域 RGB 数据丢失
2026-03-03 21:56:48 +08:00
InpaintRegionEditor Dev
21237290db
fix: 加载新图时自动更新 region_coords widget
2026-03-03 21:45:18 +08:00
InpaintRegionEditor Dev
cbcefeacae
revert: 回滚上次的修改
2026-03-03 20:57:56 +08:00
InpaintRegionEditor Dev
d068920fd5
fix: 刷新节点后从 widgets_values 恢复 region_coords
2026-03-03 20:56:31 +08:00
InpaintRegionEditor Dev
3f2a15e7ea
fix: 刷新节点后恢复图像和选区数据
...
- onNodeCreated: 如果 image widget 已有值,加载图像
- loadImageAndDetectMask: 检查 region_coords widget 恢复之前的选区
2026-03-03 20:49:29 +08:00
InpaintRegionEditor Dev
b6f9256d76
fix: 刷新节点后重新加载图像数据
2026-03-03 20:45:06 +08:00
InpaintRegionEditor Dev
5d3cf16bac
fix: 编辑图像模式使用 channel=rgb 避免被掏窟窿
2026-03-03 20:20:50 +08:00
InpaintRegionEditor Dev
aedae4a941
fix: 使用 app.ui.settings API 获取 ComfyUI 语言设置
2026-03-03 20:16:04 +08:00
InpaintRegionEditor Dev
65722f376a
fix: 修复 i18n 加载路径问题
...
- 将 locales 目录移到 web 目录下(WEB_DIRECTORY 映射)
- 添加 console.log 调试加载状态
- 在 beforeRegisterNodeDef 中确保语言加载完成
2026-03-03 20:13:29 +08:00
InpaintRegionEditor Dev
3268b79853
feat: 添加多语言支持(中英文)
...
- 添加 i18n 模块,检测 ComfyUI 语言设置
- 创建 locales/zh/main.json 和 locales/en/main.json
- 替换所有硬编码的中文文本为 i18n.t() 调用
- 支持右键菜单、Photopea 模态框、状态提示等文本
2026-03-03 20:06:34 +08:00
InpaintRegionEditor Dev
6f8713a317
fix: 修复选区坐标同步到后端的问题
...
- 在 onNodeCreated 和 configure 中创建 region_coords hidden widget
- 确保节点从工作流加载时 widget 也存在
- 修复蒙版边界检测:alpha < 255 都计入边界
2026-03-03 18:29:25 +08:00
InpaintRegionEditor Dev
a4f8f78a0e
feat: Photopea 蒙版编辑功能 + 修复 RGB 被掏窟窿问题
...
- 新增 Photopea 蒙版编辑模式(双图层:参考图像 + 蒙版层)
- 使用 channel=rgb 和 channel=a 分离加载,绑过 Canvas premultiplied alpha 问题
- UPNG.js 集成,保存时保留 Alpha=0 的 RGB 数据
- 支持羽化效果(半透明蒙版)
- 修复蒙版边界框检测:alpha < 255 都计入边界
- 右键菜单分离:编辑图像 / 编辑蒙版
2026-03-03 15:16:21 +08:00
InpaintRegionEditor Dev
e91c014c03
feat: 支持 Ctrl+V 粘贴图片
...
- 添加全局粘贴事件监听(捕获阶段)
- 阻止系统创建新 LoadImage 节点
- 只处理当前选中的 InpaintRegionEditor 节点
2026-03-03 12:12:58 +08:00
InpaintRegionEditor Dev
da3b913317
feat: 选区调整大小 + 光标变化 + 图像尺寸显示
...
- 支持拖动边缘/角落调整选区大小
- 光标根据位置变化:移动(grab)、调整大小(箭头)
- 边缘检测阈值优化(不超过选区15%)
- 图像左下角显示原图尺寸
- 选区约束:框住蒙版 + 不超出边界
2026-03-03 11:31:48 +08:00
InpaintRegionEditor Dev
fec62d7758
feat: 选区约束 + MaskEditor 集成
...
- 选区约束:必须框住蒙版且不能超出图像边界
- 添加右键菜单 Open in MaskEditor 功能
- 使用 app.extensionManager.command.execute() 调用系统命令
- 统一 constrainRegion() 函数处理所有选区约束逻辑
- 移除红色蒙版区域显示(真实蒙版已在图像上显示)
2026-03-03 10:50:41 +08:00
InpaintRegionEditor Dev
23c748bcf0
feat: 自定义图像渲染 + 选区框绘制 + 拖动功能
...
主要更改:
- 重写前端 extension.js,完全自己控制图像渲染
- 去掉 nodes.py 的 image_upload,避免双图像问题
- 实现选区框绘制(橙色)+ 遮罩区域显示(红色)
- 实现选区框拖动功能
- 修复 onMouseDown 参数格式: (e, pos, canvas)
- 更新文档和开发日志
2026-03-02 22:31:54 +08:00
InpaintRegionEditor Dev
59b8ea0c56
debug: Add detailed logging for mask export
...
- Log each step of mask detection
- Log channel list from Photopea
- Log success/failure at each step
- Helps identify where export fails
2026-02-27 20:56:03 +08:00
InpaintRegionEditor Dev
d0c835700d
fix: Properly export layer mask from Photopea
...
- Use Photopea's native layer mask feature
- Users can: Layer > Layer Mask > Reveal All
- Draw mask with brush (black/white)
- Apply feathering via Properties panel
- Export mask correctly from Mask channel
2026-02-27 20:47:25 +08:00
InpaintRegionEditor Dev
a5eb559df5
fix: Use selection instead of layer mask for simpler workflow
...
- Changed from layer mask to selection-based mask export
- Faster execution, no timeout issues
- Simpler user workflow: use selection tool (M) to draw mask area
- Updated hints to reflect selection-based workflow
2026-02-27 20:32:40 +08:00
InpaintRegionEditor Dev
7c2b031dfd
fix: Auto-close after save, single save button
...
- Auto-close modal 300ms after successful save
- Single 'Save Image and Mask' button (export layer mask)
- User draws mask using Photopea's built-in layer mask tools
- Simplified code structure
2026-02-27 20:15:49 +08:00
InpaintRegionEditor Dev
ef08bc1b91
fix: Separate save buttons, fix DOM error on close
...
- Split into two buttons: 'Save Image' and 'Save Mask from Selection'
- Add isOpen flag to prevent DOM operations after modal close
- Simplify mask export: create mask directly from selection
- Better error handling and status messages
2026-02-27 20:09:43 +08:00
InpaintRegionEditor Dev
cf0f8e404a
Initial commit: Photopea integration for inpaint editing
2026-02-27 19:55:26 +08:00