I’m looking for an action or a script that not only automatically deletes all invisible and empty layers within a PSD file but also deletes them within the smart objects contained in the file without having to open them separately. Is there such an action/script and can it be done in the first place considering the logic of steps to be done?
Search the Photoshop Scripting forum and and also Google. I have seen several Photoshop scripts on the web for doing that. An action would not be able to do that.