Rebirth saves keep children's trigger events; ExtendedVersion 2

Flattening adds the events animation layers' children fire to the
animation's triggers on those frames (events matched by name, added when
missing). Extended documents now write ExtendedVersion="2", for files that
may hold libraries, animation layers, child playback, several events per
trigger, alpha offsets and blur.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-08 18:43:15 -04:00
1 parent 38ce53f870
commit 4a13c345ef
101 files changed
+139 -100

No files matched your search

+10
View File
@@ -188,6 +188,16 @@ TEST_CASE("flattening animation layers bakes their children into plain layers th
CHECK(game.find(" Animation=\"") == std::string::npos);
CHECK(game.find("spin/red") != std::string::npos);
CHECK(std::ranges::count_if(model_load(text).content.layers, &model::Layer::is_animation) == 3);
// Children's triggers join the flattened animation's, their events found (or added) by name.
spin.content.events.push_back({.id = 0, .name = "spun"});
spin.animation_edit(0)->triggers.frames.push_back({.atFrame = 5, .eventIds = {0}});
flat = edit::animation_layers_flatten(anm2, library_get,
[](const model::Model&, const std::filesystem::path& path) { return path; });
auto& triggers = flat.animation_get(0)->triggers.frames;
REQUIRE(triggers.size() == 1);
CHECK(triggers.front().atFrame == 1);
CHECK(model::item_get(flat.content.events, triggers.front().eventIds.front())->name == "spun");
}
TEST_CASE("an animation layer's child sits where the layer's frame puts it")