Thanks, @antirotor.
Ok, now I see that the path mapping in OP settings, set for macos or Linux, would run symbolic linking command.
Mac:
scr = f'do shell script "ln -s {source} {destination}" with administrator privileges'
args = ["osascript", "-e", scr]
Linux:
args = ["sudo", "ln", "-s", source, destination]
I guess this part was just skipped in the docs, so it needs some clarification on how it is used on other platforms.
So, as it seems to me now, the general/disk mapping
option does not do anything for cross platform compatibility, and just sets alternative place for the workdir inside the current platform environment.
Let me describe what I’m trying to achieve so you could see and, if possible, correct my approach.
I have an OP database on Mongo Atlas and a shots published on the Windows machine. Then I set up the site sync between the mac laptop and the studio location, it looks like this:
I use Fusion and, unlike Maya and Houdini, it has no path mapping options in OP settings (although it has internal path mapping, which I didn’t set yet)
In case the Mac user wants to continue working with the shot started on Windows, they sync the published workfile and open on Mac with no issues. But the paths in all contaiters and renders would still be Windows-style, like D:SYNC/Openpype
, and hence not available immediately. The way to handle this is to set pathmaps inside the DCC settings. The question here would be, which site should I map in my DCC, local or studio?
If I just map studio site, I will not benefit from the site sync anymore, as all paths would be mapped to a network location. I would need to map to the local site then, but as you can see on screenshot, the local path has nothing in common with the studio path. And since the local site can be set in local settings, it may differ from artist to artist. This seem a nightmare to handle.
Alternatively, as I have just realized, I can open the Scene Inventory on a Mac machine, right click on the asset and choose Switch Asset. This will update the Loader file path according to the local site location. This seems to be a workaround, but it is a bit counterintuitive and requires some manual work, especially if the workfile has a lot of assets. This either needs some automation, or I’m just doing this wrong. Oh, and I will still need to replace the renderer path as well, either by creating a new render with publisher, or writing some script for render path replacement. Do you have any suggestions for such workflow?