PS linked objects script MacOS
Hi folks,
TL;DR: I am trying to find (or create) a way to automatically relink all linked objects across multiple subfolders from a shared drive in a single PSD upon opening the file in Photoshop CC for MacOS.
Long version: I work in a studio where PS files must be shared between a team of artists and many of us touch the files at different points in the process. We have container PSDs with multiple linked objects in each, and the source files for the linked objects are stored on a shared Google Drive. MacOS changes the base directory for the shared drive to each person's username and Google Drive has its own credentials, so that even when the relative folder placement remains the same (ex. SharedDrive/Folder/Workfiles/Example.psd) the absolute path changes upstream from the files, forcing each artist to relink all the files manually at open. (ex. Users/NameNameson/Library/CloudStorage/GoogleDrive-namenameson@companyname.com/SharedDrive/Folder/Workfiles/Example.psd)
We have different asset types organized into different folders on the shared drive, but once created, the relative file structure within the project folder does not change. The automatic dialog only works to relink files in the same folder and the process must be repeated for each folder that contains linked files. Our workflow does not currently use Photoshop Libraries, though if nothing else works, that might be an option if we can also get the library files to copy to Drive.
I've looked through lots of posts describing similar issues here, on reddit, and on github, and cannot find a solution for this problem. I've already tried this script and its update (https://community.adobe.com/t5/photoshop-ecosystem-ideas/is-there-an-option-that-shows-me-a-list-with-all-smart-objects-paths/idi-p/12657491#U12689475) and while it finds the broken links without an issue, I cannot get it to update them. jazz-y mentioned that one part of it only works on Windows and that may be hanging the rest of the function for me on Mac.
Is it even possible to change PS relink behavior to look only at relative file paths, or to specify the highest level directory that it should look in? Can this be scripted or controlled via an action? We're losing a lot of time tracking down source file locations when they should be known or (hopefully) automatically populated, and I would love to streamline the process.

