From bf2ffd2bf967635ea48ea4741166de97691b678a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 11 Sep 2026 18:58:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=92=E7=BB=9D=E4=BF=9D=E5=AD=98=E6=97=A0?= =?UTF-8?q?=E5=8F=AF=E8=A7=81=E5=83=8F=E7=B4=A0=E7=9A=84=E5=88=87=E5=88=86?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 透明裁切区域直接返回可恢复错误,避免登记空素材。 --- .../src/ui_editor/commands/separation/workflow/cut.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs index bd4e9d2c7..e39de4ba8 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs @@ -53,6 +53,9 @@ fn cut_processed_image_blocking( .map_err(|e| format!("读取处理图失败:{e}"))? .to_rgba8(); let normalized = normalize_binding_area(&image, *area)?; + if normalized.transparent { + return Err("分离区域没有可见像素".to_string()); + } let original_area = *area; let normalized_area = normalized.area; app_log!(