Based on this documentation, it seems that it is only possible to get a list of top-level layers. Is there a way to get a list of layers from inside groups? It seems there must be a way I would think.
Because typescript is just a superset of javascript any javascript code is also valid typescript code. If you use Visual Studio Code and try to copy-paste this code into a .js file it will warn you with the red squiggly lines. Thatās part of the code that needs to be removed
Thanks!
I use Brackets. Iām not a ārealā programmer so I donāt use Visual Studio. I know just enough to hack together some javascript to make my Photoshop ideas work
Youāre welcome I also used Brackets before and I love the color theme it has so when switched to VS code I found and immediately installed that same color theme.
Brackets
I built my first enterprise CEP plugin with it because the IT department wouldnāt let me install VS Code.
I smashed out ā10k lines of code in 3 months having never written a jot of JS in my life and tbh Bracketsā simplicity definitely helped with that - Iāll always have a soft spot for it.
That said, VS Code is flipping great and much like Photoshop it can seem really daunting at first because it is so feature rich, but when you realise that you only need about 10% of those features to actually produce working code itās not so bad.
Definitely worth giving it a shot - itās worth it for IntelliSense alone (the thing that reads your code as you type and autocompletes).
as mentioned in other topics, layers is a proxy not an actual array.
you can loop through it like arrays just not using for-in, you can the good old for i++ or for-of
Also, if you donāt want to show the error to the user, but still want to log it for debugging purposes you can wrap the entire logic into try...catch block. Something like this: