-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any example for lottie_animation_property_override
?
#11
Comments
I did not expect someone to use that function, so little thought was put into it. Seems like I wrongly assumed that the To change fillcolor property of fill1 object in the layer1->group1->fill1 hirarchy to RED color: lottie_animation_property_override(
"LOTTIE_ANIMATION_PROPERTY_FILLCOLOR",
"layer1.group1.fill1",
ctypes.c_double(1.0),
ctypes.c_double(0.0),
ctypes.c_double(0.0)
) If all the color property inside group1 needs to be changed to GREEN color: lottie_animation_property_override(
"LOTTIE_ANIMATION_PROPERTY_FILLCOLOR",
"**.group1.**",
ctypes.c_double(0.0),
ctypes.c_double(1.0),
ctypes.c_double(0.0)
) Please try. If this works please tell me so I can make changes to the docs. EDIT: Seems like it is not working and need some work, will update about this |
Please try v1.3.6, I cannot demonstrate that it works, but should be less broken. Maybe you can figure this out yourself. Unfortunately I don't have more time and interest in digging further. Please tell me if it works. Note that the API has changed: https://rlottie-python.readthedocs.io/en/latest/rlottie_python.html#rlottie_python.rlottie_wrapper.LottieAnimation.lottie_animation_property_override You should call like: from rlottie_python import LottieAnimation, LottieAnimationProperty
lottie_animation_property_override(
LottieAnimationProperty.LOTTIE_ANIMATION_PROPERTY_FILLCOLOR,
"layer1.group1.fill1",
ctypes.c_double(1.0),
ctypes.c_double(0.0),
ctypes.c_double(0.0)
) |
Sorry for the late reply, testing it with this simple lottie file, it dosn't seem to work from rlottie_python.rlottie_wrapper import LottieAnimation, LottieAnimationProperty
import ctypes
anim = LottieAnimation.from_file("/home/muhammad/Downloads/circle.json")
anim.lottie_animation_property_override(
LottieAnimationProperty.LOTTIE_ANIMATION_PROPERTY_FILLCOLOR,
"Layer.Ellipse.Fill",
ctypes.c_double(1.0),
ctypes.c_double(0.1),
ctypes.c_double(0.5),
)
anim.save_animation("/home/muhammad/Downloads/circle.gif") |
yes I tried with something similar, not working, need more investigation by others... |
Hey, sorry if this is a dumb question but I can't get the lottie_animation_property_override function to work on my end. Do you by any chance have an example I could use?
The text was updated successfully, but these errors were encountered: