Hi @Karmalakas Thanks for the help.
I tried almost all the selection methods by name and ID that would be more viable, I realized that the problem is that when making a layer an intelligent object, its id changes. One solution I tried was to select by index, but I get an error and the selection does not match the indexes obtained. Where am I going wrong? Follow the video.
Hi JasonM! Thanks for your tip, but I wasn’t successful.
Selecting by name worked perfectly using batchPlay, my mistake was not saving the “selected layers” before converting to smart object.
Here is the correct code to convert selected layers to smart object while keeping them selected.
Actually, to further optimize your code, you should just create a single array of descriptors (including re-selection of layers at the end) and call BP only once in total (instead of 6 in 3 layers case)