SHA256
Rename AdvancedConfig.Extension to FileExtension
This commit is contained in:
3 files changed
+18
-16
No files matched your search
@@ -502,10 +502,12 @@ namespace ADOFAIRenderer.Core
|
|||||||
var videoFPS = Configuration.VideoFPS;
|
var videoFPS = Configuration.VideoFPS;
|
||||||
|
|
||||||
var startTime = DateTime.Now;
|
var startTime = DateTime.Now;
|
||||||
var fileName = startTime.ToString("yyyy-MM-dd HH-mm-ss") + $".{Configuration.AdvancedConfig.Extension}";
|
|
||||||
_currentOutPath = Path.Combine(MelonEnvironment.GameRootDirectory, "Render", fileName);
|
|
||||||
|
|
||||||
if (RenderContext.OutputPath != null) _currentOutPath = RenderContext.OutputPath;
|
if (RenderContext.OutputPath != null) _currentOutPath = RenderContext.OutputPath;
|
||||||
|
else {
|
||||||
|
var fileName = startTime.ToString("yyyy-MM-dd HH-mm-ss") +
|
||||||
|
$".{Configuration.AdvancedConfig.FileExtension}";
|
||||||
|
_currentOutPath = Path.Combine(MelonEnvironment.GameRootDirectory, "Render", fileName);
|
||||||
|
}
|
||||||
|
|
||||||
FFmpegNativeEncoder? videoFFmpeg = null;
|
FFmpegNativeEncoder? videoFFmpeg = null;
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace ADOFAIRenderer.Data
|
|||||||
public int? RandomSeed { get; set; } = null;
|
public int? RandomSeed { get; set; } = null;
|
||||||
public bool ProcessAudio { get; set; } = true;
|
public bool ProcessAudio { get; set; } = true;
|
||||||
public bool NonTile { get; set; } = false;
|
public bool NonTile { get; set; } = false;
|
||||||
public string Extension { get; set; } = "mkv";
|
public string FileExtension { get; set; } = "mkv";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class VideoEncodingConfig
|
public class VideoEncodingConfig
|
||||||
|
|||||||
+12
-12
@@ -124,7 +124,7 @@ namespace ADOFAIRenderer.UI
|
|||||||
ProcessAudio = config.AdvancedConfig.ProcessAudio,
|
ProcessAudio = config.AdvancedConfig.ProcessAudio,
|
||||||
RandomSeed = config.AdvancedConfig.RandomSeed,
|
RandomSeed = config.AdvancedConfig.RandomSeed,
|
||||||
NonTile = config.AdvancedConfig.NonTile,
|
NonTile = config.AdvancedConfig.NonTile,
|
||||||
Extension = config.AdvancedConfig.Extension
|
FileExtension = config.AdvancedConfig.FileExtension
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_advancedConfigContainer != null && _root.Contains(_advancedConfigContainer))
|
if (_advancedConfigContainer != null && _root.Contains(_advancedConfigContainer))
|
||||||
@@ -162,18 +162,18 @@ namespace ADOFAIRenderer.UI
|
|||||||
_advancedConfigContainer.Add(titleRow);
|
_advancedConfigContainer.Add(titleRow);
|
||||||
|
|
||||||
// 2. 확장자 로우
|
// 2. 확장자 로우
|
||||||
var extensionRow = CreateRow();
|
var fileExtensionRow = CreateRow();
|
||||||
var extensionLabel = CreateFormLabel("확장자");
|
var fileExtensionLabel = CreateFormLabel("확장자");
|
||||||
var extensionChoices = new List<string> { "mkv", "mp4", "mov", "webm", "avi" };
|
var fileExtensionChoices = new List<string> { "mkv", "mp4", "mov", "webm", "avi" };
|
||||||
var currentExt = string.IsNullOrWhiteSpace(tempConfig.Extension) ? "mkv" : tempConfig.Extension.TrimStart('.').ToLower();
|
var currentFileExt = string.IsNullOrWhiteSpace(tempConfig.FileExtension) ? "mkv" : tempConfig.FileExtension.TrimStart('.').ToLower();
|
||||||
if (!extensionChoices.Contains(currentExt))
|
if (!fileExtensionChoices.Contains(currentFileExt))
|
||||||
{
|
{
|
||||||
extensionChoices.Add(currentExt);
|
fileExtensionChoices.Add(currentFileExt);
|
||||||
}
|
}
|
||||||
var extensionDropdown = new DropdownField(extensionChoices, currentExt) { name = "AdvancedExtension" };
|
var fileExtensionDropdown = new DropdownField(fileExtensionChoices, currentFileExt) { name = "AdvancedFileExtension" };
|
||||||
extensionRow.Add(extensionLabel);
|
fileExtensionRow.Add(fileExtensionLabel);
|
||||||
extensionRow.Add(extensionDropdown);
|
fileExtensionRow.Add(fileExtensionDropdown);
|
||||||
_advancedConfigContainer.Add(extensionRow);
|
_advancedConfigContainer.Add(fileExtensionRow);
|
||||||
|
|
||||||
// 3. 오디오 처리 로우
|
// 3. 오디오 처리 로우
|
||||||
var processAudioRow = CreateRow();
|
var processAudioRow = CreateRow();
|
||||||
@@ -227,7 +227,7 @@ namespace ADOFAIRenderer.UI
|
|||||||
|
|
||||||
saveBtn.RegisterCallback<ClickEvent>(_ =>
|
saveBtn.RegisterCallback<ClickEvent>(_ =>
|
||||||
{
|
{
|
||||||
tempConfig.Extension = extensionDropdown.value;
|
tempConfig.FileExtension = fileExtensionDropdown.value;
|
||||||
tempConfig.ProcessAudio = processAudioToggle.value;
|
tempConfig.ProcessAudio = processAudioToggle.value;
|
||||||
tempConfig.NonTile = nonTileToggle.value;
|
tempConfig.NonTile = nonTileToggle.value;
|
||||||
if (int.TryParse(randomSeedField.value?.Trim(), out var seed))
|
if (int.TryParse(randomSeedField.value?.Trim(), out var seed))
|
||||||
|
|||||||
Reference in new issue
Block a user