I'm encountering some strange behaviour with selectedItems:
When I select a group of two objects, selectedItems.length returns 3 -> the group, and every object in the group. I would expect selectedItems to return 1.
This is creating problems for me since I want to raster the activeSelection, which means I need to put all the selected items in a new group to raster them into one image.
var ad=activeDocument;
var orSel=ad.selectedItems;
var toRaster = new Group(ad);
ad.activeLayer.append(toRaster);
for(i=0; i<orSel.length; i++){
toRaster.append(orSel[i]);
}
If this is how selectedItems should work, does anyone maybe know a work around?