优化工作区传播和清空交互
- 手工多边形、矩形和圆在未选语义分类时默认归入 maskid:0 的待分类类别。 - 后端自动传播按来源 annotation/mask/seed key 区分同类多实例,避免多个同类型 mask 传播时互相清理。 - 左侧工具栏在橡皮擦下方新增彩色 AI 自动传播入口,传播权重和范围控件只在进入传播后显示。 - 移除顶栏重复的清空片段遮罩入口,并取消当前清空/DEL 弹窗中的按帧范围清空路径。 - Canvas 右下角显示当前帧:XX/XXX,并调整布尔操作浮层位置避免重叠。 - 更新前端和后端回归测试,覆盖待分类默认、工具栏自动传播和同类多实例传播。 - 同步 AGENTS 与 doc 文档,说明新的工具栏、清空和传播行为。
This commit is contained in:
@@ -279,6 +279,10 @@ def _seed_identity_matches(mask_data: dict[str, Any], seed_key: str, seed: dict[
|
||||
source_mask_id = seed.get("source_mask_id")
|
||||
if source_mask_id and mask_data.get("source_mask_id") == source_mask_id:
|
||||
return True
|
||||
has_persisted_seed_identity = source_annotation_id is not None or bool(source_mask_id)
|
||||
has_previous_identity = bool(previous_seed_key) or mask_data.get("source_annotation_id") is not None or bool(mask_data.get("source_mask_id"))
|
||||
if has_persisted_seed_identity or has_previous_identity:
|
||||
return False
|
||||
return _legacy_seed_matches(mask_data, seed)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user