Import a Lottie/bodymovin JSON as a Rive scene fragment (art + timing + easing)
riv_lottie_importConvert Lottie (.json) animations into Rive scene fragments, preserving keyframed transforms, bezier easing, and layer hierarchy for direct use in Rive scenes.
Instructions
Convert a Lottie (bodymovin, .json) animation — the format used by LottieFiles' huge library of free, professionally animated assets — into a riv_create scene fragment. Unlike riv_import_svg (shapes only), this carries over the professional's actual choreography: keyframed position/rotation/scale/opacity with their exact bezier easing curves (not approximated to a named preset), shape/null/precomp layer hierarchy, solid layers, gradient fills, stroke trim-path animation, and layer in/out visibility windows. Writes a scene-fragment JSON with {groups,shapes,animations} plus a rendered preview and a coverage/warnings summary. Since the fragment includes animations (which riv_create's "imports" mechanism does not merge), splice its groups/shapes/animations arrays directly into your riv_create scene spec instead of using "imports". Supported: shape layers (path/ellipse/rect/star/polygon/fill/stroke/gradient/trim/nested groups), null layers, solid layers, one level of precomp inlining, parented layers, hold and bezier easing. Not imported (counted in coverage.skipped, not silently dropped): text layers, masks, track mattes, repeaters, merge-paths, path/gradient-position keyframe morphing (frozen to first frame + warning), time-remapped precomps, expressions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Inline Lottie JSON text (alternative to path) | |
| path | No | Path to the Lottie .json file | |
| outSpec | Yes | Output scene-fragment JSON path (e.g. anim.scene.json) | |
| idPrefix | No | Prefix for generated group/shape ids (avoid collisions) |