docs+godot: finish frame-cadence RE notes + headless shot null-guard
Prior-session WIP: RE findings on the engine frame cadence (engine-re.md, phase-a-slice-plan.md, tools-reference.md) and a null-guard so headless --shot-sequence advances without a rendered viewport texture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -162,8 +162,10 @@ public partial class Main : Godot.Control
|
||||
if (_seqDir != null && _seqIdx < _seqFrames && !_done)
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(_seqDir);
|
||||
var fimg = GetViewport().GetTexture().GetImage();
|
||||
fimg.SavePng($"{_seqDir}/frame_{_seqIdx:0000}.png");
|
||||
// Headless has no rendered viewport texture (GetImage() is null). Still advance/count/quit so the
|
||||
// real-run trace-histogram can profile the live path without a display; only the PNG grab is skipped.
|
||||
var fimg = GetViewport().GetTexture()?.GetImage();
|
||||
fimg?.SavePng($"{_seqDir}/frame_{_seqIdx:0000}.png");
|
||||
_seqIdx++;
|
||||
if (_seqIdx >= _seqFrames) { GD.Print($"SEQ saved {_seqIdx} frames -> {_seqDir}"); GetTree().Quit(0); }
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user