Hi all! I'm working on a script where the user has pick where to save a file and later being able to export a comp to the place the user picked.
Right now it works like this:
- The user gets a File.saveDialog, asking where to save the file
- The URL the user picks are saved in the scripts UI. For it to be readable the script converts the URL with fsName
- The user selects a comp and settings from the scripts UI press a render-button
- The script puts the comp in the renderqueue and adds all wanted settings including the URL the user picked before
Here is where the problem happens... Let's say the user wants to save the file in a folder on the dectop, then the URl first will look like this: ~/desktop/folder%20with%20spaces/myfile.mov. After fsName it will look like this /Users/username/desktop/folder with spaces/myfile.mov
When the script later adds this text into the renderqueue (using curentItemRendering.outputModule(1).file = File(OldURL);) the URL in the render queue becomes /Volume/Users/username/desktop/folder with spaces/myfile.mov and won't be able to render because that folder doesn't exist. The correct folder would be /Volume/Macintosh HD(or what your macHDD is named)/Users/username/desktop/folder with spaces/myfile.mov
This problem only happens on osx for me, not on PC. Is there any way possible to make this work? I'm totaly out of ideas how to make this process to work.
Simply: how to add a text like /Users/username/desktop/folder to outputModule(x).file as the URL.
Thanks!