mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-24 04:09:29 +01:00
stepByStep framerate & gui fixes
This commit is contained in:
2
Code/Form1.Designer.cs
generated
2
Code/Form1.Designer.cs
generated
@@ -1348,6 +1348,7 @@
|
|||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||||
this.ClientSize = new System.Drawing.Size(934, 501);
|
this.ClientSize = new System.Drawing.Size(934, 501);
|
||||||
|
this.Controls.Add(this.cancelBtn);
|
||||||
this.Controls.Add(this.stepSelector);
|
this.Controls.Add(this.stepSelector);
|
||||||
this.Controls.Add(this.runStepBtn);
|
this.Controls.Add(this.runStepBtn);
|
||||||
this.Controls.Add(this.updateBtn);
|
this.Controls.Add(this.updateBtn);
|
||||||
@@ -1358,7 +1359,6 @@
|
|||||||
this.Controls.Add(this.patreonBtn);
|
this.Controls.Add(this.patreonBtn);
|
||||||
this.Controls.Add(this.paypalBtn);
|
this.Controls.Add(this.paypalBtn);
|
||||||
this.Controls.Add(this.discordBtn);
|
this.Controls.Add(this.discordBtn);
|
||||||
this.Controls.Add(this.cancelBtn);
|
|
||||||
this.Controls.Add(this.longProgBar);
|
this.Controls.Add(this.longProgBar);
|
||||||
this.Controls.Add(this.installerBtn);
|
this.Controls.Add(this.installerBtn);
|
||||||
this.Controls.Add(this.panel1);
|
this.Controls.Add(this.panel1);
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ namespace Flowframes
|
|||||||
|
|
||||||
public BatchEntry GetBatchEntry()
|
public BatchEntry GetBatchEntry()
|
||||||
{
|
{
|
||||||
|
SetTab("interpolate");
|
||||||
return new BatchEntry(inputTbox.Text.Trim(), outputTbox.Text.Trim(), GetAi(), fpsInTbox.GetFloat(), interpFactorCombox.GetInt(), GetOutMode());
|
return new BatchEntry(inputTbox.Text.Trim(), outputTbox.Text.Trim(), GetAi(), fpsInTbox.GetFloat(), interpFactorCombox.GetInt(), GetOutMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,12 +153,11 @@ namespace Flowframes
|
|||||||
|
|
||||||
public void runBtn_Click(object sender, EventArgs e)
|
public void runBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
SetTab("interpolate");
|
||||||
if (!BatchProcessing.busy)
|
if (!BatchProcessing.busy)
|
||||||
SetTab("interpolation");
|
SetTab("interpolation");
|
||||||
if (fpsInTbox.Visible)
|
Interpolate.SetFps(fpsInTbox.GetFloat());
|
||||||
Interpolate.SetFps(fpsInTbox.GetFloat());
|
Interpolate.interpFactor = interpFactorCombox.GetInt();
|
||||||
if (interpFactorCombox.Visible)
|
|
||||||
Interpolate.interpFactor = interpFactorCombox.GetInt();
|
|
||||||
string inPath = inputTbox.Text.Trim();
|
string inPath = inputTbox.Text.Trim();
|
||||||
string outPath = outputTbox.Text.Trim();
|
string outPath = outputTbox.Text.Trim();
|
||||||
Interpolate.Start(inPath, outPath, tilesize.GetInt(), GetOutMode(), GetAi());
|
Interpolate.Start(inPath, outPath, tilesize.GetInt(), GetOutMode(), GetAi());
|
||||||
@@ -228,7 +228,7 @@ namespace Flowframes
|
|||||||
|
|
||||||
public void SetWorking(bool state)
|
public void SetWorking(bool state)
|
||||||
{
|
{
|
||||||
Control[] controlsToDisable = new Control[] { runBtn, settingsBtn, installerBtn };
|
Control[] controlsToDisable = new Control[] { runBtn, runStepBtn, settingsBtn, installerBtn };
|
||||||
Program.busy = state;
|
Program.busy = state;
|
||||||
foreach (Control c in controlsToDisable)
|
foreach (Control c in controlsToDisable)
|
||||||
c.Enabled = !state;
|
c.Enabled = !state;
|
||||||
@@ -372,10 +372,13 @@ namespace Flowframes
|
|||||||
bool stepByStep = Config.GetInt("processingMode") == 1;
|
bool stepByStep = Config.GetInt("processingMode") == 1;
|
||||||
stepSelector.Visible = stepByStep;
|
stepSelector.Visible = stepByStep;
|
||||||
runStepBtn.Visible = stepByStep;
|
runStepBtn.Visible = stepByStep;
|
||||||
|
runBtn.Visible = !stepByStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void runStepBtn_Click(object sender, EventArgs e)
|
private async void runStepBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
SetTab("interpolate");
|
||||||
|
Interpolate.SetFps(fpsInTbox.GetFloat());
|
||||||
await InterpolateSteps.Run(stepSelector.Text);
|
await InterpolateSteps.Run(stepSelector.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ namespace Flowframes
|
|||||||
|
|
||||||
if (!Directory.Exists(currentFramesPath) || IOUtils.GetAmountOfFiles(currentFramesPath, false, "*.png") <= 0)
|
if (!Directory.Exists(currentFramesPath) || IOUtils.GetAmountOfFiles(currentFramesPath, false, "*.png") <= 0)
|
||||||
{
|
{
|
||||||
Cancel("Failed to extract frames from input video!");
|
Cancel("Input frames folder is empty!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.GetInt("dedupMode") == 1)
|
if (Config.GetInt("dedupMode") == 1)
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ namespace Flowframes.Main
|
|||||||
|
|
||||||
public static async Task DoInterpolate ()
|
public static async Task DoInterpolate ()
|
||||||
{
|
{
|
||||||
currentFramesPath = Path.Combine(currentInterpFramesDir, Paths.framesDir);
|
currentFramesPath = Path.Combine(currentTempDir, Paths.framesDir);
|
||||||
if (!Directory.Exists(currentFramesPath))
|
if (!Directory.Exists(currentFramesPath))
|
||||||
{
|
{
|
||||||
InterpolateUtils.ShowMessage("There are no extracted frames that can be interpolated!\nDid you run the extraction step?", "Error");
|
InterpolateUtils.ShowMessage("There are no extracted frames that can be interpolated!\nDid you run the extraction step?", "Error");
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace Flowframes.UI
|
|||||||
{
|
{
|
||||||
public static async Task InitInput (TextBox outputTbox, TextBox inputTbox, TextBox fpsInTbox)
|
public static async Task InitInput (TextBox outputTbox, TextBox inputTbox, TextBox fpsInTbox)
|
||||||
{
|
{
|
||||||
|
Program.mainForm.SetTab("interpolate");
|
||||||
outputTbox.Text = inputTbox.Text.Trim().GetParentDir();
|
outputTbox.Text = inputTbox.Text.Trim().GetParentDir();
|
||||||
string path = inputTbox.Text.Trim();
|
string path = inputTbox.Text.Trim();
|
||||||
Program.lastInputPath = path;
|
Program.lastInputPath = path;
|
||||||
|
|||||||
Reference in New Issue
Block a user