Please help us find a way to extract animation-names of nested-artboard without path.
We are using WebJS. Alex from discord couldn't help us and advices us to find somebody from the Runtime Team to aid in our quest.
Me and my developer want a trigger outside of the .riv file to trigger the Nested Artboard-animation. We use a custom CMS which produces a list of the artboard's animations for a user to pick from. Unfortunately, we can only get the Animation-names of the parent-artboard to display.
My developer can't seem to do the same for the animations of Nested Artboards unless I provide him the exact 'path', which is unviable for my users.
Am I missing something, or is there truly no way to have my developer be able to extract and activate, from my rive file, the (names of) nested artboards animations, without me giving him the 'paths' of those nested artboards? Is there a workaround for this?
Any help is very welcome!
There's no built-in way to do this with the Rive API, but I wonder if you could do it by using a standard naming convention. Let's say all your nested artboard paths are named Nested_0
, Nested_1
, etc. In the Rive file you also add an input called nestedArtboardCount
that says how many nested artboards your JS code should expect to fin.
Then in your JS:
Get the
nestedArtboardCount
valueCreate a loop where you get each of the arboard path names (
Nested_${index}
)
Let me know if that makes sense.
Hi Lance! Thanks for your suggestion. I'll test this out tomorrow with my developer. I'll get back to you on this!