lottie-api icon indicating copy to clipboard operation
lottie-api copied to clipboard

Fails to find Keypath

Open martirius opened this issue 3 years ago • 0 comments

Hi @bodymovin , we are trying to add a valueCallback to our animation to change color of a gradient fill.

This is our animation : animation

What we tried:

var property = animationAPI.getKeyPath("COCKTAIL_STANDARD,Group 1,Gradient Fill 1")
animationAPI.addValueCallback(property, function(currentValue) {
        console.log("Current Value -", currentValue)
        return [0.1, 0.2, 0.3, 1]
    })

We noticed that the callback is never called, investigating the functiong getKeypath it seems that it can't find the childs of the first Keypath.

Can you please help us? Thanks

martirius avatar Mar 03 '21 18:03 martirius