SVG sheets: draw tool hint, convert to PNG for Rebirth; game copy skips built-in events

Drawing or erasing on an SVG spritesheet shows why it can't be edited (and
no longer leaves an empty undo step). Saving a Rebirth document whose layers
show SVG spritesheets first offers to convert them into PNGs beside them
(one undoable edit); keeping them counts them in the Isaac warning. The
game's copy of a trigger keeps its first event that isn't stop or done, and
only further custom events count as dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-08 17:56:06 -04:00
1 parent 5d274e547a
commit 280adaa189
14 files changed
+154 -10

No files matched your search

+16
View File
@@ -3,6 +3,11 @@
#include <algorithm>
#include <unordered_set>
#include "image.hpp"
#include "path.hpp"
using namespace anm2ed::util;
namespace anm2ed::model
{
// The slot holding the animation at a flat index (animations inside groups count in order), or nullptr.
@@ -369,6 +374,17 @@ namespace anm2ed::model
repair(library.uid);
}
// SVG spritesheets that layers show.
std::set<int> spritesheets_vector_used_get(const Model& model)
{
std::set<int> ids{};
for (const auto& layer : model.content.layers)
if (auto spritesheet = item_get(model.content.spritesheets, layer.spritesheetId);
spritesheet && !layer.is_animation() && path::is_extension(spritesheet->path, resource::image::SVG_EXTENSION))
ids.insert(spritesheet->id);
return ids;
}
int track_frames_count_get(const Track& track) { return (int)track.frames.size(); }
int track_length_get(const Track& track)