补强传播帧清空识别
- 按帧范围清空时检查完整选择帧段,确保范围内人工/AI 标注帧会触发确认 - 将 propagation_seed_signature 和 legacy propagation source 纳入传播 mask 识别 - 同步 Canvas、时间轴和工作区的传播帧判断,避免传播帧误判为人工帧 - 更新项目指南、需求冻结和设计冻结文档中的传播链识别字段
This commit is contained in:
@@ -67,12 +67,13 @@ function propagationSourceMaskTokens(value: unknown): string[] {
|
||||
|
||||
function isPropagationMask(mask: Mask): boolean {
|
||||
const metadata = mask.metadata || {};
|
||||
const source = typeof metadata.source === 'string' ? metadata.source : '';
|
||||
return source.includes('_propagation')
|
||||
const source = typeof metadata.source === 'string' ? metadata.source.toLowerCase() : '';
|
||||
return source.includes('propagat')
|
||||
|| metadata.propagated_from_frame_id !== undefined
|
||||
|| metadata.propagation_seed_key !== undefined
|
||||
|| metadata.source_annotation_id !== undefined
|
||||
|| metadata.source_mask_id !== undefined;
|
||||
|| metadata.source_mask_id !== undefined
|
||||
|| metadata.propagation_seed_signature !== undefined;
|
||||
}
|
||||
|
||||
function propagationLineageTokens(mask: Mask): Set<string> {
|
||||
|
||||
@@ -48,12 +48,13 @@ export function FrameTimeline({
|
||||
const currentSeconds = totalFrames > 0 ? currentFrameIndex / timeBaseFps : 0;
|
||||
const totalSeconds = totalFrames > 0 ? Math.max(totalFrames - 1, 0) / timeBaseFps : 0;
|
||||
const isPropagatedMask = (mask: (typeof masks)[number]) => {
|
||||
const source = typeof mask.metadata?.source === 'string' ? mask.metadata.source : '';
|
||||
return source.includes('_propagation')
|
||||
const source = typeof mask.metadata?.source === 'string' ? mask.metadata.source.toLowerCase() : '';
|
||||
return source.includes('propagat')
|
||||
|| mask.metadata?.propagated_from_frame_id !== undefined
|
||||
|| mask.metadata?.source_annotation_id !== undefined
|
||||
|| mask.metadata?.source_mask_id !== undefined
|
||||
|| mask.metadata?.propagation_seed_key !== undefined;
|
||||
|| mask.metadata?.propagation_seed_key !== undefined
|
||||
|| mask.metadata?.propagation_seed_signature !== undefined;
|
||||
};
|
||||
const propagatedFrameMarkers = useMemo(() => {
|
||||
const frameIds = new Set(frames.map((frame) => frame.id));
|
||||
|
||||
@@ -261,12 +261,13 @@ const propagationHistoryEqual = (
|
||||
);
|
||||
|
||||
const isPropagatedMask = (mask: Mask) => {
|
||||
const source = typeof mask.metadata?.source === 'string' ? mask.metadata.source : '';
|
||||
return source.includes('_propagation')
|
||||
const source = typeof mask.metadata?.source === 'string' ? mask.metadata.source.toLowerCase() : '';
|
||||
return source.includes('propagat')
|
||||
|| mask.metadata?.propagated_from_frame_id !== undefined
|
||||
|| mask.metadata?.source_annotation_id !== undefined
|
||||
|| mask.metadata?.source_mask_id !== undefined
|
||||
|| mask.metadata?.propagation_seed_key !== undefined;
|
||||
|| mask.metadata?.propagation_seed_key !== undefined
|
||||
|| mask.metadata?.propagation_seed_signature !== undefined;
|
||||
};
|
||||
|
||||
const metadataNumber = (value: unknown): number | null => {
|
||||
|
||||
Reference in New Issue
Block a user