Skip to content

feat(assets): expose pose graph enter info, drag handlers and stash references - #1

Merged
Changdw merged 2 commits into
Changdw:feature/animation-graph-inspectorfrom
looopmax:feature/animation-graph-inspector
Sep 3, 2026
Merged

feat(assets): expose pose graph enter info, drag handlers and stash references#1
Changdw merged 2 commits into
Changdw:feature/animation-graph-inspectorfrom
looopmax:feature/animation-graph-inspector

Conversation

@looopmax

@looopmax looopmax commented Sep 3, 2026

Copy link
Copy Markdown

变更说明

为 Pink Animation Graph 的全量编辑能力提供 cocos-cli 侧支持:

  • 姿态图节点 enter info 投影(state-machine / animation-blend / stash):引擎 getEnterInfo 仅在 EDITOR 下安装,CLI 运行时改为按节点属性等价推导,支撑双击进入子图导航。
  • 新增 queryPoseGraphAssetDragHandlers 查询与 create-pose-node-on-asset-drag 命令:按资产类型返回拖拽 handler 清单,拖入动画剪辑可一步创建携带 clip 的运动节点。
  • 新增 queryStateMachineComponentTypes:返回可挂载到状态机状态的 StateMachineComponent 类名清单。
  • Layer Stash 视图附带 referenceCount(经 visitStashReferences 统计),供删除确认提示使用。
  • 新增 set-transition-condition-binding-classset-transition-event-binding 命令;条件视图增加 bindingClass,过渡视图增加 startEvent / endEvent
  • 同步 cocos-cli-types dts 声明与快照,并补齐对应测试。

验证结果

  • npx jest src/core/assets/test/animation-graph-service.test.ts:13/13 通过(覆盖 enterInfo、拖拽 handler、组件类型查询、stash 引用计数、绑定类切换与事件绑定等新增用例)。
  • 配套 PinK 扩展(looopmax/PinK@feat/animation-graph)已联调:扩展 typecheck 与 node 测试全绿,npm run compile 通过。

影响范围

  • @cocos/cocos-cli-types 类型与 assets 域新增 API/命令,均为增量,无既有行为变更。
  • 配套 UI 改动在 PinK 扩展仓库,本 PR 不含 PinK 代码。

looopmax and others added 2 commits September 3, 2026 11:43
…eferences

- derive pose node enter info (state-machine / animation-blend / stash)
  without the editor-only `getEnterInfo` prototype methods
- add `queryPoseGraphAssetDragHandlers` and the
  `create-pose-node-on-asset-drag` command to create motion pose nodes
  from dropped assets
- add `queryStateMachineComponentTypes` for state machine component menus
- count layer stash references via `visitStashReferences`
- add `set-transition-condition-binding-class` and
  `set-transition-event-binding` commands with transition condition
  binding dumps and event binding fields

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@Changdw
Changdw merged commit 5d07a6f into Changdw:feature/animation-graph-inspector Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants