So I wrote another script.
It reorders your replicated symbols so the bottom-most, right-most ones get sent to the the top of the pile.
Might work well for isometric game art or just making a whole forest of random trees.
Thing is- it needs testing.
It could probably be made more efficient too.
Any ideas, let me know.
Enjoy.
#target Illustrator var docRef = app.activeDocument;
var sel = docRef.selection;
var selLen = sel.length;
if(!sel.length) { alert("You must make a selection.");
}
function stack(sel){// Only fire this off once the sel array has been sorted.
var layer = app.activeDocument.layers[0];
var len = sel.length;
for (var i=0;i<len;i++){
var item = sel[i];
item.move(layer, ElementPlacement.PLACEATBEGINNING);
}
}
function sortByScore(a,b){
var scoreA = Math.round(Math.abs(a.top));
var scoreB = Math.round(Math.abs(b.top));
return (scoreA-scoreB);
}
sel.sort(sortByScore);// First: Sort sel by score. This takes the sel array and runs it through the sortByScore function.
stack(sel);// Second: restack sel in the parent now that it's sorted. Needs work.