明确序列帧去背景处理模式
去背景弹窗要求用户显式选择纯色键控或通用智能分割。 纯色模式支持颜色输入和吸管取色,并以本地算法处理任意键色。 通用模式逐帧使用 BgFilter complex 分割,禁止携带键色。 入队与 durable worker 统一校验模式参数并持久化权威处理元数据。 补充双色键控、模式冲突、双路径路由和前端交互回归。 同步更新 Spine 技术方案与团队决策记录。
This commit is contained in:
@@ -19,6 +19,7 @@ import { uploadEditorMediaAssetFile } from '../../services/image-editor/editorMe
|
||||
import {
|
||||
createEditorProjectResource,
|
||||
type EditorAssetSnapshot,
|
||||
type EditorCharacterAnimationBackgroundRemovalMode,
|
||||
type EditorPixelArtSnapInput,
|
||||
type EditorPixelArtSnapResult,
|
||||
type EditorProjectLayerSnapshot,
|
||||
@@ -3676,7 +3677,13 @@ export function useImageCanvasGenerationWorkflow({
|
||||
);
|
||||
|
||||
const removeSelectedCharacterAnimationBackground = useCallback(
|
||||
async (sourceLayer: CanvasLayer) => {
|
||||
async (
|
||||
sourceLayer: CanvasLayer,
|
||||
options: {
|
||||
mode: EditorCharacterAnimationBackgroundRemovalMode;
|
||||
screenColor?: string;
|
||||
},
|
||||
) => {
|
||||
if (
|
||||
!canRemoveCharacterAnimationBackground(sourceLayer) ||
|
||||
!canSplitCharacterAnimationFrames(sourceLayer) ||
|
||||
@@ -3716,6 +3723,10 @@ export function useImageCanvasGenerationWorkflow({
|
||||
projectId,
|
||||
sourceLayerId: sourceLayer.id,
|
||||
sourceResourceId: sourceLayer.resourceId,
|
||||
mode: options.mode,
|
||||
...(options.mode === 'solid-color' && options.screenColor
|
||||
? { screenColor: options.screenColor }
|
||||
: {}),
|
||||
assetFolderId,
|
||||
assetLabel,
|
||||
...(backgroundRemovalPlacement?.placeholder
|
||||
|
||||
Reference in New Issue
Block a user