Tools for Designers to Add Slots (sid) in Lottie Files #3845
Replies: 5 comments
-
|
@hermet can you guide please |
Beta Was this translation helpful? Give feedback.
-
|
+ @tinyjin |
Beta Was this translation helpful? Give feedback.
-
How about using dotlottie-player? |
Beta Was this translation helpful? Give feedback.
-
|
Actually, we’ve fixed Lottie JSON as the default for now, so switching to another format isn’t possible. Our pipeline currently generates JSON files, and After Effects Bodymovin only outputs JSON. Because of this, we are now forced to use a single large JSON that covers all use cases instead of handling them through slots. How are slots typically generated today? Are JSONs being manually edited? That seems like a fairly error-prone approach. I was hoping to rely on a script to manage this, unless Bodymovin already provides such a tool. |
Beta Was this translation helpful? Give feedback.
-
|
Hello @manishagarwal23, Just to clarify, sid is required, not nm. Without an explicit sid, the slot will not work. Unfortunately, as far as I know, there seems no official Lottie slot converter available without coding stuffs when we use Instead, you can simply add the sid directly in the JSON: If you have a property you want to control with a slot, you can make it slotable by adding a "sid" field at the same JSON depth as that property. (Also you can refer to the document that Hermet has shared above)
I understand what you're concerned about. After you modify JSON, to make sure the file is changed correctly, you can check with Lottie Validator(https://lottie.github.io/validator). |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
the Lottie files generated using the After Effects bodymovin plugin don’t include slotId or sid. Do the provided examples still work if they do not contain a sid but say nm ? For example, in LottieExtension.cpp
, the code loads slot4.json:
Here, slot4.json (from resources/extensions/slot4.json
) is being used which is a specifc slot_id
Is there any tool available for designers to convert normal lottie files into slotted lotties ?
Beta Was this translation helpful? Give feedback.
All reactions