Script to move keyframes to markers
I've been trying to do that for a while, and I realise it can only be done through script rather than expression.
the main use is for lip syncing, have used several method including time remap to markers, haracter animator, and autoLipSync from mamo world. The two previous just jump to the shape, and the later uses deformation, but doesn't do it by modifing the shape of a shape layer, and I want to do it with a shape layer, and make it morph towards the next shape instead of jump, or get deform likes its an image instead of a shape.
I tryed to learn scripting but I got way over my head.
So here here is my idea that could make it work:
First I have a shape layer, with all the different mouth shape I want, keyframe and layer markers at each keyframe
I then have a null object with markers labelled same as the shape layer, but the markers are set to where I want each different shape to come. Like that:
Now the script should work like that.
First I select the path property with all the keyframes, and then run the script
The script then ask me which layer are the end results markers, in my case the Null layer
the script then makes a copy of the shape layer,
delete all the keyframes in the selected property, on that copied shape layer
Reads the markers from the Null layer
And copies the value equivalent to that marker from the original layer to the result layer.
here is the result I expect, I've colored circled the keyframe to demonstrate which keyframe is reproduced where;
I'm pretty sure that it can be done, and having the selected property as a variable this could work for any keyframable property, at least i think it should.
I hope I makes sense.
Is there already a script somewhere that can do that? Or can someone help me writing it.
Wasn't that easy after all,
But spent the whole week end trying to figure it out. if any one is interested
It works only for one property, if some one wants to enhance it to be able to select multiple properties you are welcome to do so.
below is the code.
Maybe someone can clean it up a little, this is the first time I write a script, and I'm pretty happy about the results.
Works like that:
Create your keyframes and add markers to what I call the origin layer.
Create a null and place the markers with there corresponding comment to where you need them.
Select the property from the origin layer and run the script
I realize that this is an old thread, but I've can't found a similar topic anywhere else, and this issue is very important to me.
When I run this script AE says: "property or method named 'app' is missing or doesnt exist".
My comp looks like that:
What I'm doing wrong?
Hello, sorry its only now that I see you question.
This a script not an expression.
You should go to file->scripts->Open Scripts editor,
and paste the code in there and run it.
It is not a on the go continuous solution, every time you move the markers you have to rerun the script.