Hi there,
I have made a little progress with this problem, and my solution has been to use the “create shapes from text” command from the layer menu. However this handy little tool only does one frame at a time, so I decided to have a go at writing a script that would go through the work area one frame at a time, creating shapes from the text as a new layer (and preferably changing the in and out points of the new layer so that it lasts for just one frame).
However, I am new to scripting and what I’ve written still only does one frame. I’ve cannibalized part of a script called framesplitter to do this. I know why it doesn’t work; there’s nothing to tell it to change the current frame, but sadly I can’t find anything similar enough to adapt to my needs:
{
function ShapeMaker()
{
var proj = app.project;
var comp = proj.activeItem;
var activeLayer, workAreaStart, workAreaEnd, duration;
if (!(comp instanceof CompItem)) { // check if a comp is selected
alert("Please select a composition.");
return;
} else if (comp.selectedLayers.length != 1){ // check if a single layer is selected
alert("Please select a single layer.");
return;
}
activeLayer = comp.selectedLayers[0];
workAreaStart = comp.workAreaStart;
workAreaEnd = workAreaStart + comp.workAreaDuration;
if (activeLayer.inPoint > workAreaStart) workAreaStart = activeLayer.inPoint;
if (activeLayer.outPoint < workAreaEnd) workAreaEnd = activeLayer.outPoint;
duration = workAreaEnd - workAreaStart;
for (i = 1; i < duration/comp.frameDuration; i++) {
app.executeCommand(app.findMenuCommandId("Create Shapes from Text"));
}
}
ShapeMaker();
}
Can anyone tell me how to tell the script to move to the next frame? I can probably figure out the rest for myself.
Thanks,
Jason