Added a script to change de duration of a comp, and its contained precomps to a certain duration in seconds
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
/* 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);␍}␍
|
||||||
Reference in New Issue
Block a user