fix(animation): preserve dirty state and legacy targets - #822
Merged
star-e merged 13 commits intoAug 11, 2026
Conversation
knoxHuang
force-pushed
the
codex/animation-dirty-state-separation
branch
from
August 4, 2026 10:00
2addb85 to
7b4308f
Compare
knoxHuang
force-pushed
the
codex/animation-dirty-state-separation
branch
2 times, most recently
from
August 6, 2026 11:11
84107ae to
45062b1
Compare
knoxHuang
force-pushed
the
codex/animation-dirty-state-separation
branch
5 times, most recently
from
August 10, 2026 10:24
75f5598 to
e472992
Compare
knoxHuang
force-pushed
the
codex/animation-dirty-state-separation
branch
from
August 11, 2026 04:36
6a510dc to
af3c66a
Compare
star-e
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
sceneDirty,动画操作同时明确是否产生了 Animation-scoped Undo 记录。nodeUuid输入兼容性:属性轨道和帧采样优先使用nodePath;仅传nodeUuid的旧调用仍可解析当前动画根节点内的目标,但轨道只持久化 canonicalnodePath,避免 Runtime reload 后陈旧 UUID 劫持轨道。fsPath回归覆盖。EditorProxy、IPublicEditorService及 MCP 公共声明保持不变;本次内部 Scene 进程能力无需扩展 MCP API。设计说明
Scene Editor Service 负责区分普通保存、源资源存在时的另存为,以及删除源资源后的恢复保存。Animation Service 在副本保存分支完成写入后立即返回,使源 Clip 的保存后恢复、Undo 基线更新和 Scene 保存逻辑仅作用于普通源资源保存。
nodeUuid保留为旧调用的兼容输入而不是新的轨道持久化标识:有路径时路径优先;无路径时才以 UUID 在当前动画根节点内求出相对路径。该边界同时修复 DTS breaking-change 检查与旧调用的运行时行为。验证
origin/main的6f810d60。v22.20.0:7 个相关回归套件、90 个测试通过。v22.20.0:DTS 生成、9 个 DTS snapshot 测试、58 个声明测试及声明 typecheck 通过。git diff --check通过;生成 DTS 后没有产生未提交的声明或 snapshot 改动。验证边界
v22.17.9未安装,因此未擅自下载;相关回归使用已安装的v22.20.0执行。scene.test.ts已在 Node.jsv24.15.0尝试运行,但在执行用例前被本地过期的node_modules/@cocos/asset-db阻塞:最新 main 已切换到新的 workspace Asset DB API,而当前安装包缺少IAssetFileSystemProvider、AssetActionEnum等导出。该命令实际执行 0 个用例;未在未授权下重装依赖或重建原生模块。CI 的 cleannpm ci仍是完整 Scene 集成验证门槛。QA 验证步骤
A.prefab。B.prefab。A.prefab,且根节点仍关联A.prefab,不会指向B.prefab。A.prefab后再次选择 File > Save As... 创建副本;确认当前标签仍为A.prefab,其未保存状态不会因创建副本而消失。B.prefab,确认它是包含复制内容的独立资源。