Apparently 22.4 broke a lot of things. One of them is how layers are referenced (I guess)
Here’s a simple snippet:
const doc = app.activeDocument; const activeLayers = doc.activeLayers.filter(l => doc.layerTree.includes(l));
Exact same situation and
doc.layerTree.includes(l) on 22.3.1 still returns
true if selected layer is on a top level tree, but 22.4.0 and 22.4.1 return
false. My whole (payed) plugin is based on that selection and it doesn’t work anymore. Not cool at all
Any advice what would be the best approach to fix this? Or simply loop both arrays and check for layers IDs?
P. S. Is this the best place to report such bugs?