baking frames update

This commit is contained in:
2025-11-15 12:02:33 -05:00
parent 408d50b6ce
commit a968371ac6
2 changed files with 12 additions and 8 deletions

View File

@@ -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.");

View File

@@ -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]
</description>
<version>2.3</version>
<version>2.4</version>
<visibility>Public</visibility>
</metadata>