feat(editor): visual crop, rotate/mirror/flip/straighten, colour looks (owner review 1 phase 4) (#26)
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s
Owner review 1 R5 + R6. Camera rotation, mirror, flip, straighten and crop handles locked to the output; an Exposure Look group; Export output size ("proportions win"); settings format 2 with older-node gates. Also fixes project text and hashes differing between Windows and Linux.
Closes #19
Closes #20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #26.
This commit is contained in:
1 parent
db389a54f2
commit
188b2c2e55
355 files changed
+10549
-1061
No files matched your search
@@ -280,6 +280,27 @@ public sealed class ExportTab : EditorTab
|
||||
|
||||
public EditableField Height { get; }
|
||||
|
||||
/// <summary>
|
||||
/// "2160 × 3840": what the render makes of the box (Width × Height) and the chosen proportions (owner review 1, R5),
|
||||
/// "(capped)" when the encoder takes no more; null before the plan.
|
||||
/// </summary>
|
||||
public string? OutputSizeText => Editor.Plan is { } plan ? OutputSizeOf(plan) : null;
|
||||
|
||||
/// <summary>Where the output size comes from, or the largest size the encoder takes when it capped it.</summary>
|
||||
public string OutputSizeToolTip => OutputSizeToolTipOf(Editor.Plan);
|
||||
|
||||
/// <summary>The Output size row of <paramref name="plan"/>: "2160 × 3840", or "1080 × 1920 (capped)".</summary>
|
||||
public static string OutputSizeOf(ExportPlan plan)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(plan);
|
||||
return plan.IsCapped ? Loc.L("Editor.Export.Capped", SizeText(plan.EncodedSize)) : SizeText(plan.OutputSize);
|
||||
}
|
||||
|
||||
/// <summary>The Output size row's tooltip for <paramref name="plan"/>.</summary>
|
||||
public static string OutputSizeToolTipOf(ExportPlan? plan) => plan is { IsCapped: true }
|
||||
? Loc.L("Tooltips.Editor.Export.OutputCapped", SizeText(LargestTaken(plan)))
|
||||
: Loc.L("Tooltips.Editor.Export.OutputSize");
|
||||
|
||||
/// <summary>"16:9".</summary>
|
||||
public string AspectText => Editor.Plan is { } plan ? Aspect(plan.Setup.Encoder.Settings.Width, plan.Setup.Encoder.Settings.Height) : string.Empty;
|
||||
|
||||
@@ -473,6 +494,7 @@ public sealed class ExportTab : EditorTab
|
||||
try
|
||||
{
|
||||
UpdateLists();
|
||||
LoadBox();
|
||||
SaveChoices = !CanChooseFolder ? [new SaveChoice(null)]
|
||||
: Export.Folder is { } folder ? [new SaveChoice(null), new SaveChoice(folder), new SaveChoice(null, Browse: true)]
|
||||
: [new SaveChoice(null), new SaveChoice(null, Browse: true)];
|
||||
@@ -493,9 +515,7 @@ public sealed class ExportTab : EditorTab
|
||||
_refreshing = true;
|
||||
try
|
||||
{
|
||||
var settings = Editor.Plan?.Setup.Encoder.Settings;
|
||||
if (!Width.IsDirty) Width.Load(settings?.Width.ToString(CultureInfo.InvariantCulture) ?? string.Empty);
|
||||
if (!Height.IsDirty) Height.Load(settings?.Height.ToString(CultureInfo.InvariantCulture) ?? string.Empty);
|
||||
LoadBox();
|
||||
UpdateLists();
|
||||
Notices = Editor.Plan is { } plan ? PlanNotices(plan) : [];
|
||||
OnAllPropertiesChanged();
|
||||
@@ -547,6 +567,35 @@ public sealed class ExportTab : EditorTab
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Width and Height edit the preset's box, which the chosen proportions are fitted in (owner review 1, R5): they show the
|
||||
/// resolved box (empty for a side the preset leaves to the source), not the size rendered (Output size).
|
||||
/// </summary>
|
||||
private void LoadBox()
|
||||
{
|
||||
var resolved = Resolved;
|
||||
if (!Width.IsDirty) Width.Load(resolved.Width > 0 ? resolved.Width.ToString(CultureInfo.InvariantCulture) : string.Empty);
|
||||
if (!Height.IsDirty) Height.Load(resolved.Height > 0 ? resolved.Height.ToString(CultureInfo.InvariantCulture) : string.Empty);
|
||||
}
|
||||
|
||||
/// <summary>"2160 × 3840".</summary>
|
||||
private static string SizeText((int Width, int Height) size) =>
|
||||
size.Width.ToString(Loc.Culture) + " × " + size.Height.ToString(Loc.Culture);
|
||||
|
||||
/// <summary>
|
||||
/// The encoder's largest size turned as the output is (as <see cref="EncoderSelector"/> fits it) when the output is
|
||||
/// larger; otherwise the codec level capped it, and the size made is the largest it takes.
|
||||
/// </summary>
|
||||
private static (int Width, int Height) LargestTaken(ExportPlan plan)
|
||||
{
|
||||
var (width, height) = plan.OutputSize;
|
||||
if (plan.Setup.Encoder.Capability is not { } capability) return plan.EncodedSize;
|
||||
var (maxWidth, maxHeight) = (width >= height) == (capability.MaxWidth >= capability.MaxHeight)
|
||||
? (capability.MaxWidth, capability.MaxHeight)
|
||||
: (capability.MaxHeight, capability.MaxWidth);
|
||||
return width > maxWidth || height > maxHeight ? (maxWidth, maxHeight) : plan.EncodedSize;
|
||||
}
|
||||
|
||||
/// <summary>The choices that depend on the resolved codec (new lists only when they change, so selections stay bound).</summary>
|
||||
private void UpdateLists()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user