Andrew Swift Posted April 3, 2023 Posted April 3, 2023 I have a program that creates timelines programatically. I'm looking for a way to list the contents of a timeline, the way one would list the key/value pairs of a dictionary (for example). I've spent a lot of time searching for an answer, but I've found nothing. Is there an existing command that returns the contents of a timeline in some format?
Solution Cassie Posted April 3, 2023 Solution Posted April 3, 2023 Hey there, would this maybe be what you're after - https://greensock.com/docs/v3/GSAP/Timeline/getChildren() or...https://greensock.com/docs/v3/GSAP/Timeline/getTweensOf() Hope this helps! 2
GreenSock Posted April 3, 2023 Posted April 3, 2023 Yes, @Andrew Swift, I bet you're looking for getChildren() but it kinda depends on what exactly you're looking for in terms of "list the contents of a timeline". I mean ultimately it boils down to tweens and each of those have targets and you could loop over the properties of the vars object on each tween. You should be able to get whatever data you need with the methods/properties exposed. Check out the docs for details. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now