bug on a simple script..... need help!

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
bkan
Posts: 51
Joined: November 6th, 2013, 8:33 am

Hello,
I wrote this simple script : when I use the "script debogage" in extend tool script, it highlights this line : "effetLineaire = calque.Effects.addProperty("ADBE Linear Wipe");". I really don't know why?? Any idea??

function volet_lineaireVertical(){
app.beginUndoGroup("Volet Linéaire script");
var curComp = app.project.activeItem;
for (var i=0;i<=app.project.activeItem.selectedLayers.length;i++){
var calque = app.project.activeItem.selectedLayers;
effetLineaire = calque.Effects.addProperty("ADBE Linear Wipe");
effetLineaire.property("Pourcentage").setValueAtTime(curComp.time,100);
effetLineaire.property("Pourcentage").setValueAtTime(curComp.time+5,0);
for (j = 1; j <= 2; j++)
{
effetLineaire.property("Pourcentage").setInterpolationTypeAtKey(j, KeyframeInterpolationType.BEZIER);
}
//effetLineaire.property("Pourcentage").setInterpolationTypeAtKey(KeyframeInterpolationType.BEZIER)
effetLineaire.property("Angle").setValue(180);
effetLineaire.property("Contour progressif").setValue(30);
//calque.Effects.property(1).property(0).setValue(5);
}
app.endUndoGroup();
}
bkan
Posts: 51
Joined: November 6th, 2013, 8:33 am

ah ok i understand! it is :
"for (var i=0;i<app.project.activeItem.selectedLayers.length;i++){"
Post Reply