SHA256
Add Customizable Output Filename Formatting
This commit is contained in:
1 parent
b66d774cb9
commit
d90d06c095
6 files changed
+287
-3
No files matched your search
@@ -17,6 +17,11 @@ internal class GlobalConfig
|
||||
/// GlobalSettings.DefaultOutputDirectory. Ignored while the directory does not exist (see EffectiveOutputDirectory).
|
||||
/// </summary>
|
||||
public string? OutputDirectory { get; set; }
|
||||
/// <summary>
|
||||
/// File name format template chosen in the render configuration window; null or empty selects
|
||||
/// GlobalSettings.DefaultFileNameFormat ("{date} {time}").
|
||||
/// </summary>
|
||||
public string? FileNameFormat { get; set; }
|
||||
/// <summary>Name of the preset last selected or saved in the render configuration window; selected again when it opens.</summary>
|
||||
public string? LastPresetName { get; set; }
|
||||
/// <summary>
|
||||
@@ -72,6 +77,18 @@ internal static class GlobalSettings
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Default file name format template: "{date} {time}".</summary>
|
||||
public const string DefaultFileNameFormat = "{date} {time}";
|
||||
|
||||
/// <summary>
|
||||
/// File name format used for renders without an explicit output path: Current.FileNameFormat when it is set,
|
||||
/// otherwise <see cref="DefaultFileNameFormat"/>.
|
||||
/// </summary>
|
||||
public static string EffectiveFileNameFormat =>
|
||||
string.IsNullOrWhiteSpace(Current.FileNameFormat)
|
||||
? DefaultFileNameFormat
|
||||
: Current.FileNameFormat;
|
||||
|
||||
static GlobalSettings()
|
||||
{
|
||||
Load();
|
||||
|
||||
Reference in new issue
Block a user