Skip to content

Add ignore empty frames toggle to Export As window#5491

Merged
dacap merged 1 commit into
aseprite:mainfrom
JoshuaL03:add-ignore-empty-to-export-as
Oct 28, 2025
Merged

Add ignore empty frames toggle to Export As window#5491
dacap merged 1 commit into
aseprite:mainfrom
JoshuaL03:add-ignore-empty-to-export-as

Conversation

@JoshuaL03

Copy link
Copy Markdown
Contributor

Feature #5452.

This PR adds a toggle to ignore empty frames when using the "Export As..." window. Enabling the setting will prevent all empty frames from being saved/exported.

@JoshuaL03 JoshuaL03 requested a review from dacap as a code owner October 26, 2025 23:23

@aseprite-bot aseprite-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

return forTwitter()->isSelected();
}

bool ExportFileWindow::isIgnoreEmpty() const

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'isIgnoreEmpty' can be made static [readability-convert-member-functions-to-static]

Suggested change
bool ExportFileWindow::isIgnoreEmpty() const
bool ExportFileWindow::isIgnoreEmpty()

src/app/ui/export_file_window.h:37:

-   bool isIgnoreEmpty() const;
+   static bool isIgnoreEmpty() ;

@dacap dacap self-assigned this Oct 27, 2025

@dacap dacap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JoshuaL03, it looks like save-as CLI tests are broken with this change: https://github.com/aseprite/aseprite/actions/runs/18825250787/job/53706833646#step:11:138

Check my comment below 👇

Comment thread src/app/commands/cmd_save_file.cpp Outdated
doc::AniDir aniDirValue = params().aniDir();
bool isPlaySubtags = params().playSubtags();
bool isForTwitter = false;
bool isIgnoreEmpty = false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use the original ignoreEmpty parameter so running from CLI (and CLI tests) work:

Suggested change
bool isIgnoreEmpty = false;
bool isIgnoreEmpty = params().ignoreEmpty();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thank you for the help!

@dacap dacap removed their assignment Oct 27, 2025
@JoshuaL03 JoshuaL03 force-pushed the add-ignore-empty-to-export-as branch from 31361dd to 3a689a8 Compare October 28, 2025 01:45
@dacap dacap self-assigned this Oct 28, 2025
@dacap dacap added this to the v1.3.15.5 milestone Oct 28, 2025
@dacap dacap merged commit ab7e8c8 into aseprite:main Oct 28, 2025
12 checks passed
@dacap

dacap commented Oct 28, 2025

Copy link
Copy Markdown
Member

Thanks @JoshuaL03 👍 just merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants