When the command is used on groups or artboards, it doesn’t simulate the normal behaviour as when I use the mouse to click the “lock all” button. Just wondering if there’s any simple fix to make it behave like the “lock all” button.
Nope, I’m not trying to unlock all layers; just whichever layers are selected.
The plugin I’m making unlocks selected layers, does something to the layers, then relocks the layers which were previously unlocked. Changing the value to false stops it from working. The “all” in protectAll stands for the lock all button (left of the Fill dropdown).
I’ve experimented with it a bit more, and I think it’s currently impossible to do, so I might just scrap that feature.
I worked on the same feature. And in my case, I recorded all locks for all layers in the whole document. And then apply it back again for all locks in all layers.
You could also consider trying DOM instead of batchplay. Unless you need top performance.
Ok, now I understand what is going on. It is problem on PS side. @Barkin
It does explicitly lock all folder content as you set it on the group. This apply for “applyLocking” event. You can also lock layers using “set” event that shouldn’t have this issue. But in this case it works only for selected layers so you have to select them in advance.