Fixed frame order ini for blending

This commit is contained in:
N00MKRAD
2021-03-22 21:29:47 +01:00
parent 6a5cd569b3
commit 3ceaee12a5
2 changed files with 4 additions and 5 deletions

View File

@@ -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);

View File

@@ -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]");
}
}