Bug 499568 - Command line export-sequence fails if file already exists
Summary: Command line export-sequence fails if file already exists
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (other bugs)
Version First Reported In: 5.2.6
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-05 22:47 UTC by cromachina
Modified: 2025-04-01 02:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cromachina 2025-02-05 22:47:30 UTC
SUMMARY
Attempting to export an animation sequence from the command line results in an error if the exported files already exist. This does not happen when exporting a non-sequence, single image.

STEPS TO REPRODUCE
1. Make a document with an animation in it: test.kra
2. Exit Krita (cannot export with Krita open due to another bug https://bugs.kde.org/show_bug.cgi?id=460631).
3. Export the document's animation:
  krita --export-sequence --export-filename test.png test.kra
4. Run the same export command again (as if you had edited the document and wanted to update the output).

OBSERVED RESULT
krita.general: "Failed to render animation frames!" 

EXPECTED RESULT
The target files are overwritten.
Or, if this is not acceptable, then a more clear error could be given like: "Failed to render animation frames! Output files cannot be overwritten with export-sequence." 

WORKAROUND
Delete the files before running the export command.

SOFTWARE/OS VERSIONS
Operating System: NixOS 25.05
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.6.71 (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX
Comment 1 Emmet O'Neill 2025-04-01 02:51:09 UTC
Git commit 5c14db972cd26785e07a56d9a288fec023342c26 by Emmet O'Neill.
Committed on 01/04/2025 at 02:50.
Pushed by emmetoneill into branch 'master'.

CLI/Animation: Fixed failure to overwrite existing animation sequence.

Exporting animation sequence from the command line no longer fails
when frames already exist in the target directory.

M  +8    -2    libs/ui/KisApplication.cpp
M  +31   -31   libs/ui/dialogs/KisAsyncAnimationFramesSaveDialog.cpp

https://invent.kde.org/graphics/krita/-/commit/5c14db972cd26785e07a56d9a288fec023342c26