更新godot ai 到最新版本

This commit is contained in:
2026-09-22 16:07:50 +08:00
parent 9dc02dbb31
commit 020ab88606
46 changed files with 5816 additions and 400 deletions
+3 -3
View File
@@ -500,7 +500,7 @@ func _take_screenshot_impl(params: Dictionary) -> Dictionary:
"viewport_2d",
"Captured an empty image from the 2D viewport. The 2D viewport produced no output — typically headless mode or the 2D viewport has not drawn a frame yet."
)
return _finalize_image(image_2d, "viewport_2d", max_resolution)
return _finalize_image(image_2d, "viewport_2d", max_resolution, viewport.use_hdr_2d)
_:
return ErrorCodes.make(ErrorCodes.VALUE_OUT_OF_RANGE, "Invalid source '%s' — use 'viewport', 'viewport_2d', 'cinematic', or 'game'" % source)
@@ -848,9 +848,9 @@ func _find_current_camera_3d(root: Node) -> Camera3D:
return first
func _finalize_image(image: Image, source: String, max_resolution: int) -> Dictionary:
func _finalize_image(image: Image, source: String, max_resolution: int, use_hdr_2d := false) -> Dictionary:
## Shared with the game-process copy in runtime/game_helper.gd (#716).
var encoded := McpScreenshotEncode.downscale_and_encode(image, max_resolution)
var encoded := McpScreenshotEncode.downscale_and_encode(image, max_resolution, use_hdr_2d)
return {
"data": {
"source": source,