Skip to content

feat(scene): scene get screenshot - #883

Open
DecviL wants to merge 4 commits into
cocos:mainfrom
DecviL:scene-get-screenshot
Open

feat(scene): scene get screenshot#883
DecviL wants to merge 4 commits into
cocos:mainfrom
DecviL:scene-get-screenshot

Conversation

@DecviL

@DecviL DecviL commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary
Add scene-get-screenshot for headless scene rendering, including live PinK editor state and optional gizmo overlays.

Changes

  • Capture scenes and prefabs with multi-camera composition
  • Support JPEG/PNG, custom resolution, and compression
  • Synchronize the active scene, editor camera, selection, and unsaved node/component changes
  • Overlay selection gizmos and the 3D scene-axis gizmo
  • Preserve editor-only state and protect unsaved changes
  • Add timeout handling, request serialization, temporary-file cleanup, and MCP image output
  • Improve prefab selection path resolution

Test Steps
npx tsc -b --pretty false
npm test -- --runInBand \ src/core/scene/test/browser-scene-state.test.ts \ src/core/scene/test/editor-close-options.test.ts \ src/core/scene/test/screenshot-camera-params.test.ts \ src/core/scene/test/selection-prefab-path.test.ts \ tests/mcp-image-result.test.ts \ tests/scene-screenshot-api.test.ts

@DecviL DecviL changed the title Scene get screenshot feat(scene): Scene get screenshot Aug 24, 2026
@DecviL DecviL changed the title feat(scene): Scene get screenshot feat(scene): scene get screenshot Aug 24, 2026
Comment thread src/api/scene/screenshot-schema.ts Outdated
Comment thread src/api/scene/screenshot.ts Outdated
Comment thread src/core/scene/common/screenshot.ts Outdated
Comment thread src/core/scene/common/screenshot.ts Outdated
Comment thread src/api/scene/screenshot.ts Outdated
Comment thread src/mcp/mcp.middleware.ts Outdated
@DecviL
DecviL force-pushed the scene-get-screenshot branch from 8bc03f0 to be2a898 Compare August 25, 2026 04:19
- add typed camera snapshot and restore APIs
- avoid orphaned temporary PNGs when metadata collection fails
- keep base64 image data out of structured MCP responses and logs
- update public type snapshots
@DecviL DecviL closed this Aug 26, 2026
@DecviL DecviL reopened this Aug 26, 2026
@DecviL DecviL closed this Aug 26, 2026
@DecviL DecviL reopened this Aug 26, 2026
@DecviL DecviL closed this Aug 26, 2026
@DecviL DecviL reopened this Aug 26, 2026
@DecviL DecviL closed this Aug 26, 2026
@DecviL DecviL reopened this Aug 26, 2026
@DecviL DecviL closed this Aug 26, 2026
@DecviL DecviL reopened this Aug 26, 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