From 3ceaee12a57318bfd4ff1f67bc537b4b58091c28 Mon Sep 17 00:00:00 2001 From: N00MKRAD Date: Mon, 22 Mar 2021 21:29:47 +0100 Subject: [PATCH] Fixed frame order ini for blending --- Code/Magick/Blend.cs | 2 +- Code/Main/FrameOrder.cs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Code/Magick/Blend.cs b/Code/Magick/Blend.cs index d1f7dd8..21d9ce9 100644 --- a/Code/Magick/Blend.cs +++ b/Code/Magick/Blend.cs @@ -60,7 +60,7 @@ namespace Flowframes.Magick for (int blendFrameNum = 1; blendFrameNum <= amountOfBlendFrames; blendFrameNum++) { - int outputNum = firstOutputFrameNum + blendFrameNum + 1; + int outputNum = firstOutputFrameNum + blendFrameNum; string outputPath = Path.Combine(Interpolate.current.interpFolder, outputNum.ToString().PadLeft(Padding.interpFrames, '0')); outputPath = Path.ChangeExtension(outputPath, ext); outputFilenames.Add(outputPath); diff --git a/Code/Main/FrameOrder.cs b/Code/Main/FrameOrder.cs index 587b902..4dc23b5 100644 --- a/Code/Main/FrameOrder.cs +++ b/Code/Main/FrameOrder.cs @@ -155,11 +155,12 @@ namespace Flowframes.Main string frameBeforeScn = Path.GetFileName((frameFiles[i].Name.GetInt() + 1).ToString().PadLeft(Padding.inputFramesRenamed, '0')) + frameFiles[i].Extension; string frameAfterScn = Path.GetFileName((frameFiles[i + 1].Name.GetInt() + 1).ToString().PadLeft(Padding.inputFramesRenamed, '0')) + frameFiles[i + 1].Extension; string scnChangeNote = $"SCN:{frameBeforeScn}>{frameAfterScn}"; + //bool last = i == (frameFilesWithoutLast.Length - 1); + totalFileCount++; fileContent = WriteFrameWithDupes(dupesAmount, fileContent, totalFileCount, ext, debug, $"[In: {inputFilenameNoExt}] [{((frm == 0) ? " Source " : $"Interp {frm}")}]", scnChangeNote); if (Config.GetInt("sceneChangeFillMode") == 0) // Duplicate last frame { - totalFileCount++; int lastNum = totalFileCount; for (int dupeCount = 1; dupeCount < interpFramesAmount; dupeCount++) @@ -170,12 +171,10 @@ namespace Flowframes.Main } else { - totalFileCount++; - for (int dupeCount = 1; dupeCount < interpFramesAmount; dupeCount++) { totalFileCount++; - fileContent = WriteFrameWithDupes(dupesAmount, fileContent, totalFileCount, ext, debug, $"[In: {inputFilenameNoExt}] [DISCARDED - BLEND]"); + fileContent = WriteFrameWithDupes(dupesAmount, fileContent, totalFileCount, ext, debug, $"[In: {inputFilenameNoExt}] [BLEND FRAME]"); } }