I was wondering if it was possible to set something up so that if a layer/comp changers length or gets replaced, a different layer (which would be connected to it somehow) could have its own length be altered automatically.
To explain, I am currently using Templater Rig to set up some automation on repetitive video production. This swaps some footage in layers with other footage, which can change in terms of length. As such, I was wondering if it might be possible to have another layer change its position in the timeline automatically in response to the change in length of another layer in the timeline.
Just as well, if this were possible somehow, might it also be possible to change not just a layer’s position in the timeline, but also some keyframes so that they change in accordance with the length of a different layer?
I appreciate any help/advice! If this is impossible, well, I tried!
When you say length, do you mean some measure of the size of the layer or do you mean its duration in the timeline?
Both can interact with any property if you code it properly. Could you be more precise on what it should change?
I'll give you some pseudo code example. lets say you want a layer's duration to control the time it takes a circle to go from right to left. I would precompose the animation and add a linear expression to this precomp's time remap property to vary in accordance to the control's layer outPoint-inPoint (essentially its duration in the composition).
If you want it to control the amount of value the circle moves, I would multiply the circles position value with the difference obtained from a base duration value and a changed one.