允许导出单个时自动使用所有模型的所有动画最大时长

This commit is contained in:
ww-rm
2025-06-14 10:48:38 +08:00
parent 6114d4c954
commit 6fe639d6dd
8 changed files with 6 additions and 19 deletions

View File

@@ -34,7 +34,6 @@ namespace SpineViewer.ViewModels.Exporters
using var exporter = new FrameSequenceExporter(_renderer.Resolution.X + _margin * 2, _renderer.Resolution.Y + _margin * 2)
{
BackgroundColor = new(_backgroundColor.R, _backgroundColor.G, _backgroundColor.B, _backgroundColor.A),
Duration = _duration,
Fps = _fps,
KeepLast = _keepLast
};
@@ -55,6 +54,7 @@ namespace SpineViewer.ViewModels.Exporters
var output = Path.Combine(_outputDir!, folderName);
if (_autoResolution) SetAutoResolutionAnimated(exporter, spines);
if (_duration < 0) exporter.Duration = spines.Select(sp => sp.GetAnimationMaxDuration()).DefaultIfEmpty(0).Max();
exporter.ProgressReporter = (total, done, text) =>
{