keyframes control with layer markers
Posted: April 9th, 2015, 8:29 am
Hello,
I have an animation of a line that has two sets of keyframes of two different properties in CS4.
Basically a line gets generated in the first phase then it gets cleared out in the second phase.
This is done using two slider controls that act on the horizontal size of two rectangles and using merge paths (using the second rectangle as a matte for the first to clear it out)
I've put two layer markers on my layer hoping to link the keyframes to each of them.
Then I have found this script on the web and I put it on the first property :
L= thisComp.layer("ShapeLayer");
n = 0;
if (L.marker.numKeys > 0){
n = L.marker.nearestKey(time).index;
if (L.marker.key(n).time > time){
n--;
}
}if (n == 0){
valueAtTime(0);
}else{
t = time - L.marker.key(n).time;
valueAtTime(t)
}
This indeed lets me move the whole animation with the layermarker (which is very good) but I can't find a way to link the second set of keyframes to do the output.
I will add the project file
Please help!
Thanks
I have an animation of a line that has two sets of keyframes of two different properties in CS4.
Basically a line gets generated in the first phase then it gets cleared out in the second phase.
This is done using two slider controls that act on the horizontal size of two rectangles and using merge paths (using the second rectangle as a matte for the first to clear it out)
I've put two layer markers on my layer hoping to link the keyframes to each of them.
Then I have found this script on the web and I put it on the first property :
L= thisComp.layer("ShapeLayer");
n = 0;
if (L.marker.numKeys > 0){
n = L.marker.nearestKey(time).index;
if (L.marker.key(n).time > time){
n--;
}
}if (n == 0){
valueAtTime(0);
}else{
t = time - L.marker.key(n).time;
valueAtTime(t)
}
This indeed lets me move the whole animation with the layermarker (which is very good) but I can't find a way to link the second set of keyframes to do the output.
I will add the project file
Please help!
Thanks