M11.4: Lottie export/import
New crate effectcraft-lottie (L3): export a comp to Lottie JSON / dotLottie (precomp and base64 image assets; shape, solid, null, precomp, image and text layers or glyph shapes; transforms with parenting, separated position, anchor; keyframes with speed/influence converted to normalised i/o tangents, hold keys, spatial ti/to; all shape items incl. gradients, dashes, trim, repeater and path operators; masks, track mattes, blend modes, time remap, timing, markers, optional expressions, a few Lottie effects) with a warnings list for what Lottie cannot express, and the inverse import. Commands file.exportLottie / file.importLottie with File > Export / Import entries. Round-trip tests (values and rendered frames) and hand-written fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5273f1ba96
commit
c4100bcf80
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"v": "5.12.0",
|
||||
"nm": "Bouncing Ball",
|
||||
"fr": 30,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"w": 200,
|
||||
"h": 200,
|
||||
"ddd": 0,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ddd": 0,
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "Ball",
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"a": { "a": 0, "k": [0, 0, 0] },
|
||||
"p": {
|
||||
"a": 1,
|
||||
"k": [
|
||||
{ "t": 0, "s": [100, 40, 0], "o": { "x": 0.33, "y": 0 }, "i": { "x": 0.67, "y": 1 }, "to": [0, 0, 0], "ti": [0, 0, 0] },
|
||||
{ "t": 15, "s": [100, 160, 0], "o": { "x": 0.33, "y": 0 }, "i": { "x": 0.67, "y": 1 }, "to": [0, 0, 0], "ti": [0, 0, 0] },
|
||||
{ "t": 30, "s": [100, 40, 0] }
|
||||
]
|
||||
},
|
||||
"s": { "a": 0, "k": [100, 100, 100] },
|
||||
"r": { "a": 0, "k": 0 },
|
||||
"o": { "a": 0, "k": 100 }
|
||||
},
|
||||
"ao": 0,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"st": 0,
|
||||
"bm": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"nm": "Ball",
|
||||
"it": [
|
||||
{ "ty": "el", "nm": "Circle", "d": 1, "p": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [40, 40] } },
|
||||
{ "ty": "fl", "nm": "Fill", "c": { "a": 0, "k": [0.95, 0.35, 0.2, 1] }, "o": { "a": 0, "k": 100 }, "r": 1 },
|
||||
{ "ty": "tr", "a": { "a": 0, "k": [0, 0] }, "p": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"markers": []
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
asset: bouncing-ball.json
|
||||
title: Lottie fixture: a ball bouncing with eased position keys
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M11.4)
|
||||
notes: Hand-written Lottie JSON for import tests, written from the public Lottie format description; not exported from any Adobe product or third-party file.
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"v": "4.8.0",
|
||||
"nm": "Legacy Masks",
|
||||
"fr": 30,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"w": 120,
|
||||
"h": 120,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ind": 1,
|
||||
"ty": 1,
|
||||
"nm": "Card",
|
||||
"sc": "#e0c040",
|
||||
"sw": 120,
|
||||
"sh": 120,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"st": 0,
|
||||
"sr": 1,
|
||||
"hasMask": true,
|
||||
"ks": {
|
||||
"a": { "a": 0, "k": [60, 60, 0] },
|
||||
"p": { "a": 0, "k": [60, 60, 0] },
|
||||
"s": { "a": 0, "k": [100, 100, 100] },
|
||||
"r": { "a": 0, "k": 0 },
|
||||
"o": { "a": 1, "k": [{ "t": 0, "s": [0], "e": [100], "i": { "x": [0.833], "y": [0.833] }, "o": { "x": [0.167], "y": [0.167] } }, { "t": 20 }] }
|
||||
},
|
||||
"masksProperties": [
|
||||
{
|
||||
"nm": "Outer",
|
||||
"mode": "a",
|
||||
"inv": false,
|
||||
"pt": { "a": 0, "k": { "c": true, "v": [[10, 10], [110, 10], [110, 110], [10, 110]], "i": [[0, 0], [0, 0], [0, 0], [0, 0]], "o": [[0, 0], [0, 0], [0, 0], [0, 0]] } },
|
||||
"o": { "a": 0, "k": 100 },
|
||||
"x": { "a": 0, "k": 0 }
|
||||
},
|
||||
{
|
||||
"nm": "Hole",
|
||||
"mode": "s",
|
||||
"inv": true,
|
||||
"pt": { "a": 0, "k": { "c": true, "v": [[40, 40], [80, 40], [80, 80], [40, 80]], "i": [[0, 0], [0, 0], [0, 0], [0, 0]], "o": [[0, 0], [0, 0], [0, 0], [0, 0]] } },
|
||||
"o": { "a": 0, "k": 100 },
|
||||
"x": { "a": 0, "k": 0 }
|
||||
}
|
||||
]
|
||||
},
|
||||
{ "ind": 2, "ty": 6, "nm": "Sound", "ip": 0, "op": 30, "st": 0, "sr": 1 }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
asset: legacy-masks.json
|
||||
title: Lottie fixture: legacy (e-value) keyframes, add/subtract masks and an unsupported layer type
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M11.4)
|
||||
notes: Hand-written Lottie JSON for import tests, written from the public Lottie format description; not exported from any Adobe product or third-party file.
|
||||
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"v": "5.12.0",
|
||||
"nm": "Precomp Matte Text",
|
||||
"fr": 30,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"w": 240,
|
||||
"h": 160,
|
||||
"fonts": { "list": [{ "fName": "Inter-Regular", "fFamily": "Inter", "fStyle": "Regular", "ascent": 75 }] },
|
||||
"assets": [
|
||||
{
|
||||
"id": "comp_bg",
|
||||
"nm": "Background",
|
||||
"w": 240,
|
||||
"h": 160,
|
||||
"layers": [
|
||||
{
|
||||
"ind": 1,
|
||||
"ty": 1,
|
||||
"nm": "Teal",
|
||||
"sc": "#1a8c8c",
|
||||
"sw": 240,
|
||||
"sh": 160,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"st": 0,
|
||||
"sr": 1,
|
||||
"ks": { "a": { "a": 0, "k": [120, 80, 0] }, "p": { "a": 0, "k": [120, 80, 0] }, "s": { "a": 0, "k": [100, 100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "Matte",
|
||||
"td": 1,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"st": 0,
|
||||
"sr": 1,
|
||||
"ks": { "a": { "a": 0, "k": [0, 0] }, "p": { "a": 0, "k": [120, 80] }, "s": { "a": 0, "k": [100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } },
|
||||
"shapes": [
|
||||
{ "ty": "el", "nm": "Oval", "p": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [200, 120] } },
|
||||
{ "ty": "fl", "nm": "Fill", "c": { "a": 0, "k": [1, 1, 1, 1] }, "o": { "a": 0, "k": 100 } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"ind": 2,
|
||||
"ty": 0,
|
||||
"nm": "Background",
|
||||
"refId": "comp_bg",
|
||||
"tt": 1,
|
||||
"w": 240,
|
||||
"h": 160,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"st": 0,
|
||||
"sr": 1,
|
||||
"ks": { "a": { "a": 0, "k": [120, 80, 0] }, "p": { "a": 0, "k": [120, 80, 0] }, "s": { "a": 0, "k": [100, 100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }
|
||||
},
|
||||
{
|
||||
"ind": 3,
|
||||
"ty": 5,
|
||||
"nm": "Title",
|
||||
"parent": 4,
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"st": 0,
|
||||
"sr": 1,
|
||||
"ks": { "a": { "a": 0, "k": [0, 0, 0] }, "p": { "a": 0, "k": [0, 0, 0] }, "s": { "a": 0, "k": [100, 100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } },
|
||||
"t": {
|
||||
"d": { "k": [{ "t": 0, "s": { "t": "Hello\rLottie", "f": "Inter-Regular", "s": 28, "fc": [1, 1, 1], "j": 2, "tr": 0, "lh": 33.6, "ls": 0 } }] },
|
||||
"a": [],
|
||||
"m": { "g": 1, "a": { "a": 0, "k": [0, 0] } },
|
||||
"p": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ind": 4,
|
||||
"ty": 3,
|
||||
"nm": "Controller",
|
||||
"ip": 0,
|
||||
"op": 30,
|
||||
"st": 0,
|
||||
"sr": 1,
|
||||
"ks": {
|
||||
"a": { "a": 0, "k": [0, 0, 0] },
|
||||
"p": { "a": 1, "k": [{ "t": 0, "s": [120, 60, 0], "o": { "x": 0.5, "y": 0 }, "i": { "x": 0.5, "y": 1 } }, { "t": 29, "s": [120, 100, 0] }] },
|
||||
"s": { "a": 0, "k": [100, 100, 100] },
|
||||
"r": { "a": 0, "k": 0 },
|
||||
"o": { "a": 0, "k": 100 }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
asset: precomp-matte-text.json
|
||||
title: Lottie fixture: precomp asset with a solid, alpha track matte, parented text layer and a null
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M11.4)
|
||||
notes: Hand-written Lottie JSON for import tests, written from the public Lottie format description; not exported from any Adobe product or third-party file.
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"v": "5.12.0",
|
||||
"nm": "Shapes and Gradient",
|
||||
"fr": 24,
|
||||
"ip": 0,
|
||||
"op": 24,
|
||||
"w": 160,
|
||||
"h": 120,
|
||||
"assets": [],
|
||||
"layers": [
|
||||
{
|
||||
"ind": 1,
|
||||
"ty": 4,
|
||||
"nm": "Shapes",
|
||||
"sr": 1,
|
||||
"ks": { "a": { "a": 0, "k": [0, 0] }, "p": { "a": 0, "k": [80, 60] }, "s": { "a": 0, "k": [100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } },
|
||||
"ip": 0,
|
||||
"op": 24,
|
||||
"st": 0,
|
||||
"bm": 0,
|
||||
"shapes": [
|
||||
{
|
||||
"ty": "gr",
|
||||
"nm": "Badge",
|
||||
"it": [
|
||||
{ "ty": "sr", "nm": "Star", "sy": 1, "d": 1, "pt": { "a": 0, "k": 6 }, "p": { "a": 0, "k": [-30, 0] }, "r": { "a": 0, "k": 0 }, "ir": { "a": 0, "k": 12 }, "or": { "a": 0, "k": 28 }, "is": { "a": 0, "k": 0 }, "os": { "a": 0, "k": 0 } },
|
||||
{ "ty": "rc", "nm": "Box", "d": 1, "p": { "a": 0, "k": [30, 0] }, "s": { "a": 0, "k": [50, 40] }, "r": { "a": 0, "k": 8 } },
|
||||
{
|
||||
"ty": "gf",
|
||||
"nm": "Gradient",
|
||||
"o": { "a": 0, "k": 100 },
|
||||
"r": 1,
|
||||
"s": { "a": 0, "k": [-60, 0] },
|
||||
"e": { "a": 0, "k": [60, 0] },
|
||||
"t": 1,
|
||||
"g": { "p": 2, "k": { "a": 0, "k": [0, 0.1, 0.4, 0.9, 1, 0.9, 0.2, 0.5] } }
|
||||
},
|
||||
{
|
||||
"ty": "st",
|
||||
"nm": "Outline",
|
||||
"c": { "a": 0, "k": [1, 1, 1, 1] },
|
||||
"o": { "a": 0, "k": 100 },
|
||||
"w": { "a": 0, "k": 2 },
|
||||
"lc": 2,
|
||||
"lj": 2,
|
||||
"ml": 4,
|
||||
"d": [
|
||||
{ "n": "d", "nm": "dash", "v": { "a": 0, "k": 4 } },
|
||||
{ "n": "g", "nm": "gap", "v": { "a": 0, "k": 2 } },
|
||||
{ "n": "o", "nm": "offset", "v": { "a": 0, "k": 0 } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"ty": "tm",
|
||||
"nm": "Trim",
|
||||
"s": { "a": 0, "k": 0 },
|
||||
"e": { "a": 1, "k": [{ "t": 0, "s": [10], "o": { "x": [0.167], "y": [0.167] }, "i": { "x": [0.833], "y": [0.833] } }, { "t": 23, "s": [100] }] },
|
||||
"o": { "a": 0, "k": 0 },
|
||||
"m": 1
|
||||
},
|
||||
{ "ty": "tr", "a": { "a": 0, "k": [0, 0] }, "p": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
asset: shapes-gradient.json
|
||||
title: Lottie fixture: star, rounded rectangle, linear gradient fill, dashed stroke and animated trim paths
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M11.4)
|
||||
notes: Hand-written Lottie JSON for import tests, written from the public Lottie format description; not exported from any Adobe product or third-party file.
|
||||
Reference in New Issue
Block a user