I'm trying to write a little script that builds a timecodelayer for me.
Now can somebody tell me how to change the Font and the color and so on?
I got this code:
Code: Select all
buildTimeCode();
function buildTimeCode()
{
app.beginUndoGroup("build Time Code");
var curComp = app.project.activeItem;
if (!curComp || !(curComp instanceof CompItem))
{
alert("Please select a Composition.");
return;
}
var tl = curComp.layers.addText("");
tl.position.setValue([10,10]);
var bg = curComp.layers.addSolid([0,0,0], "bg", tl.width, tl.height, 1, curComp.duration);
var expr = "timeToTimecode(t = time + thisComp.displayStartTime, timecodeBase = "+"12"+", isDuration = true)";
tl.property("Source Text").expression = expr;
tl.property("Source Text").value.font = "Arial";
tl.property("Source Text").value.fontSize = 18;
tl.property("Source Text").value.color = [1.0,1.0,1.0];
tl.moveToBeginning();
app.endUndoGroup();
}
Thanx
:F