/**
 * @author fabiantheblind
 * @description duplicates a layer 99 times
 * @source:https://github.com/ff6347/after-effects-script-snippets/blob/master/duplicate_layer.jsx
 *
 * @todo [description]
 */
 fun();
 function fun() {
 
   app.beginUndoGroup('XXX');
 
   var curComp = app.project.activeItem;
   if (!curComp || !(curComp instanceof CompItem)) {
     alert('noComp');
     return;
   }
 
   var num = 5; //复制的次数
 
   for(var i = 0; i < num; i++) {
     curComp.selectedLayers[0].duplicate();
   }
 
   app.endUndoGroup();
 }

 

您的电子邮箱地址不会被公开。 必填项已用*标注