diff --git a/src/imgui/window/timeline.cpp b/src/imgui/window/timeline.cpp
index 675d6b4..5aaa0f5 100644
--- a/src/imgui/window/timeline.cpp
+++ b/src/imgui/window/timeline.cpp
@@ -1287,13 +1287,17 @@ namespace anm2ed::imgui
if (ImGui::Button("Bake", widgetSize))
{
- if (auto item = document.item_get())
- for (auto it = frames.selection.rbegin(); it != frames.selection.rend(); ++it)
- {
- auto i = *it;
- DOCUMENT_EDIT(document, "Bake Frames", Document::FRAMES,
- item->frames_bake(i, interval, isRoundScale, isRoundRotation));
- }
+ auto frames_bake = [&]()
+ {
+ if (auto item = document.item_get())
+ for (auto i : frames.selection | std::views::reverse)
+ item->frames_bake(i, interval, isRoundScale, isRoundRotation);
+
+ frames.clear();
+ };
+
+ DOCUMENT_EDIT(document, "Bake Frames", Document::FRAMES, frames_bake());
+
bakePopup.close();
}
ImGui::SetItemTooltip("Bake the selected frame(s) with the options selected.");
diff --git a/workshop/metadata.xml b/workshop/metadata.xml
index 9b32984..b73043e 100644
--- a/workshop/metadata.xml
+++ b/workshop/metadata.xml
@@ -40,6 +40,6 @@ Alternatively, if you have subscribed to the mod, you can find the latest releas
[h3]Happy animating![/h3]
[img]https://files.catbox.moe/4auc1c.gif[/img]
- 2.3
+ 2.4
Public