__getitem__ already behaved like dictionary access when called on ArtLayers, but now it will behave the same for LayerSets. This is preferred since this is the standard Photoshop API behavior, and in terms of execution time it is usually much faster than getByName.
Additional changes:
[x] Added type hinting and appropriate try/except to getitem for both ArtLayers and LayerSets.
[x] Added getByIndex for both ArtLayers and LayerSets, to preserve the ability to access by list index in cases where this methodology may be preferred by the user.
__getitem__
already behaved like dictionary access when called on ArtLayers, but now it will behave the same for LayerSets. This is preferred since this is the standard Photoshop API behavior, and in terms of execution time it is usually much faster thangetByName
.Additional changes:
getByIndex
for both ArtLayers and LayerSets, to preserve the ability to access by list index in cases where this methodology may be preferred by the user.