How to tell if footageSource is a layer of a file (e.g. a .psd layer or .ai layer)
I want to duplicate a footageSource object, and I'm using something like this:
var oldSource = originalLayer.source;
newSource = app.project.importFile(new ImportOptions(oldSource.file));
This works fine if the original source is a flat file, like a jpg or movie file, but if it's a layer of a Photoshop image or Illustrator file it imports the whole file instead of just the layer. There doesn't seem to be any way to query a footageSource object to see if it's a layer of a multi-layer file, or not.
ImportOptions has an ImportOptions.importAs attribute, which means if I know whether the file is a layer I can specify
ImportAsType.COMP_CROPPED_LAYERS
ImportAsType.FOOTAGE
ImportAsType.COMP
ImportAsType.PROJECT
But the import type of a footage source doesn't seem to be part of the footageSource object.
