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

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

@@ -51,7 +51,6 @@ namespace SpineViewer.ViewModels.Exporters
using var exporter = new FFmpegVideoExporter(_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,
Format = _format,
@@ -76,6 +75,7 @@ namespace SpineViewer.ViewModels.Exporters
var output = Path.Combine(_outputDir!, filename);
if (_autoResolution) SetAutoResolutionAnimated(exporter, spines);
if (_duration < 0) exporter.Duration = spines.Select(sp => sp.GetAnimationMaxDuration()).DefaultIfEmpty(0).Max();
exporter.ProgressReporter = (total, done, text) =>
{