I’m making a script to rename all the layers of a file by string.
I’m using the already existing script for renaming tags.
local sprite = app.activeSprite for i, layer in ipairs(sprite.layers) do local name = layer .name layer .name = (string.gsub(name, "old string", "new string")) end
I replaced all the “tag(s)” by “layer(s)”, and it almost worked but it only changed elements that are on top of a hierarchy (everything inside a group remained untouched).
I don’t know how to affect the inside of a hierarchy.