Timelines - start and end


#1

I have a time line that will move a 3d model. All works well. I would like to reuse the time line but the start position and end position will change. As well as scale and rotation. I know I can just use code to change the position for the start of the timeline but how would I change the the position set in the timeline at the end of it?

Steve


Scripted relativeTo and timeline driven relativeToProp
#2

Hey Steve,

Hope you’ve been well.

Could you clarify which of the following you’re looking to implement please?

  • Change a node’s transformation properties stored in the timeline’s first and last keyframes.

  • Change the position of the start/end keyframes along the timeline.

  • Change the time at which the animation stops playing i.e. the timeline is 5000 ms in length, but we want the animation to only play up until 3500ms mark.

Thanks,
Seb


#3

Hay Seb,
I’m looking for the

  • Change a node’s transformation properties stored in the timeline’s first and last keyframes.

I know I can just use code to move the model’s position will change the first keyframe because I have it linked. But it will play to the last keyframe in the timeline. So how to I change the last keyframes?

Steve


#4

Hey Steve,

Unfortunately you can’t select a keyframe and change a node’s values linked to that specific keyframe through a script, you’ll have to do this through the timeline itself.

What you could do is duplicate the timeline by right clicking it and selecting ‘Duplicate’, then changing the node’s properties on the second timeline’s first/last keyframes.

Hope this helps.

Thanks,
Seb


#5

Hi again Steve,

I found a previous post with a similar issue.

Mark posted a reply on that topic that might help.

https://forum.zap.works/t/variables-in-animation/264/2

Using his method you’d create two groups in your hierarchy and change their positions to the start and end positions you’d like the timeline to transition from/to.

You’d then add the groups you’ve created to the relativeTo property of your node, but don’t drag your node into either of them.

Next, set up a timeline which transitions the node’s relativeToProp ratio from one group to the other.

(The ‘Multiple relativeTo values’ section of this docs page may help.)

By changing the positions of those groups through code you’ll also be changing the position that your node will transition from/to in the timeline.

Hope this helps.
Seb


#6

Thanks Seb!!

I can’t wait to test it out!

Steve