You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
870 B
1 line
870 B
/* TO DO
|
|
Only change lengths of layers whose endpoint is greater or equal to the old comp end point.
|
|
*/
|
|
function getSelectedProjectItems (){
|
|
var items = [];
|
|
var p = app.project;
|
|
for ( var i = 1 ; i <= p.numItems ; i ++ ){
|
|
var item = p.item(i);
|
|
if ( item.selected ){
|
|
items.push(item);
|
|
}
|
|
}
|
|
return items;
|
|
}
|
|
|
|
function applyNewLength( comp , newLength){
|
|
comp.duration = newLength;
|
|
for ( var i = 1; i <= comp.layers.length ; i ++){
|
|
if (!comp.layers[i].locked){
|
|
comp.layers[i].outPoint = newLength;
|
|
}else{
|
|
comp.layers[i].locked = false;
|
|
comp.layers[i].outPoint = newLength;
|
|
comp.layers[i].locked = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
itms = getSelectedProjectItems();
|
|
for ( var i = 0; i < itms.length ; i ++){
|
|
applyNewLength( itms[i] , 60);
|
|
}
|