-
duplicator script…undefined error
Hey there Dan, or anyone that can help!
I have the following code in my script, but am getting an undefined error in the following line:
(note the script works perfectly after I hit ok… the error is annoying but!)———
var myComp = app.project.activeItem;
var myLayers = myComp.selectedLayers;for ( var i = 0 ; i <= myLayers.length ; i++){
var curLayers = myLayers[i];
var myNewLayers = curLayers.duplicate();———
I need the duplicates to have a separate reference as i re-arrange the curLayers using the moveBefore and then the myNewLayers with the moveAfter commands (I create a solid in between).
Any help would be great as I only started looking at coding a couple of days ago.
Thanks a lot