/**
 * @author fabiantheblind
 * @description cycle thru label colors
 * @source:https://github.com/ff6347/after-effects-script-snippets/blob/master/cycle-labels.jsx
 * this is CS6+ feature I think
 *
 * @todo [description]
 */
 fun();
 function fun() {
   app.beginUndoGroup('XXX');
   var curComp = app.project.activeItem;
   if (!curComp || !(curComp instanceof CompItem)) {
     alert('noComp');
     return;
   }
   for(var i = 0; i < curComp.selectedLayers.length; i++) {
     var lay = curComp.selectedLayers[i];
     // 1~16循环。当然你可以基于某种规则设置
     lay.label = (i + 1) % 16;
   }
}

 

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