sprite ai
Measure the Right AI Icon After a Designer Removes an SVG Object
A sprite AI cleanup script might measure six object IDs and use the resulting numbers to assign atlas widths. If a designer removes the third object, a native query may return five values. Zipping them with the original six names shifts every size after the missing record.
Test the measurement as a keyed record
Start with a narrow icon, a retired icon, and a wide icon. Ask for all three, then remove the retired icon from a separate source copy. A passing importer reports the missing ID and preserves the measurements for the two known objects. It never silently assigns the next measured width to the retired item.
Make the failure actionable
Stop before writing the size manifest if a required ID is not present. For deliberately optional parts, store an explicit missing state. If the query API returns only a positional list, validate the requested IDs before calling it or measure each named object independently.
FrameSprite’s technical guide and test fixture demonstrates a successful Inkscape process returning fewer widths for a list that contains a missing ID. The keyed acceptance test protects the next stage even when the process code is zero.
Prepared by the FrameSprite Workflow Team with AI assistance. Illustrative examples are labeled in the text.