Jump to content

Recommended Posts

Question:
In Affinity Photo Export Persona, is it possible to set the export path relative to the source document?

Issue/situation:
I have a small AppleScript setup which creates a predefined folder structure for most of my commercial photo work, and once I'm done editing an image I will need to export it in multiple resolutions. The exported files are always placed in a fixed location relative to the source document and it would be great if there were an option to then export relative to the source document. My folder structure looks as following:

Project folder name
– 01 Source
–– 01 phocus capture
–– 02 capture one
–– 03 other

– 02 process
–– 01 focus stacking
–– 02 retouch			( export from retouch folder into low res, high res and website )
–– 03 assets

– 03 export
–– 01 low res version		( low res versions folder, always relative to the source document in 02 process / 02 retouch )
–– 02 high res version		( high res versions folder, always relative to the source document in 02 process / 02 retouch )
–– 03 contact sheet
–– 04 website version 

Operating system:
OSX Catalina 10.15.3

Affinity Photo:
Version 1.8.3

Any help or input on this matter is much appreciated, as I'm considering moving from other editors to Affinity Photo.

Thank you in advance.

PS: if this post is in the wrong forum, then please let me know, and I will submit it in another.

Share this post


Link to post
Share on other sites
1 hour ago, Sofa Gas Rue said:

it possible to set the export path relative to the source document?

Yes, path in Export Persona is only relative. When exporting then just enter the absolute part of the path, that is source document directory. 

 

 


Affinity Store: Affinity Suite (ADe, APh, APu) 1.8.3.
Windows 10 Pro, Version 2004, Build 19041.388.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200.

Share this post


Link to post
Share on other sites
2 hours ago, Pšenda said:

Yes, path in Export Persona is only relative. When exporting then just enter the absolute part of the path, that is source document directory. 

 

 

Hi Psenda,

Thank you for your reply. I'm a tat shaky on this so if I'm not making myself clear do let me know.

What I wish to do is avoid having to type anything absolute, but have Affinity Photo traverse from the source directory to the export directory.
I was imaging a way to do this similar to how css handles relative paths '../' or in Bash with 'cd ..'

Does that make sense?
See screenshot of how I imagined it, but this just throws an error!

 

Screenshot 2020-04-13 at 13.45.30.png

Share this post


Link to post
Share on other sites

They may bother spaces in the path name (Win usually solves this by closing the text in ""), it may be missing "/" at the end of the path to distinguish the path from the file name.


Affinity Store: Affinity Suite (ADe, APh, APu) 1.8.3.
Windows 10 Pro, Version 2004, Build 19041.388.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200.

Share this post


Link to post
Share on other sites

I've tried different version but no dice. Also grabbed the path from bash pwd to see if that would be 'more' correct but no.

If I come across anything useful I'll post it here, and thanks for your inputs.

Share this post


Link to post
Share on other sites
5 hours ago, Sofa Gas Rue said:

The exported files are always placed in a fixed location relative to the source document

At least on Windows I can specify paths relative to the source starting from that location, but trying to go up with ..\ (or ../ on macOS) causes an error so if you have the document sources in a separate sub folder it does not seem that you can create exports to parent or sibling paths...

But otherwise you can specify relative paths like this (or using user-variables, as you had done):

exportpersona_relative01.jpg.49b7591ee4f7cf25f709aad99f244623.jpg

...and get this:

exportpersona_relative02.jpg.ddf822339f0045dcaf662ca64377fe7f.jpg

EDIT: Might of course be a kind of a security thing, to ensure that exports keep in the source sandbox.

Share this post


Link to post
Share on other sites

Actually I noticed that when slices are exported, a dialog box is shown (I am not sure if globally last selected, or somehow project-wise saved), and then I can have the source .afdesign files saved in a separate sub folder (I tested two levels down from the project main folder), and then select the folder to be used as the "root", and get the slices saved in appropriat sub folders.

Share this post


Link to post
Share on other sites

Hi Lagarto,

Interesting that it works on Win. I've tried with just "low res/slice name" and that works to a sort now it just pops a window up asking where to place the exports, which defeats the purpose in my mind.

At this point I will just do it manually as I use to, the Export Persona is dandy and all if this worked but it's apparently not a big deal as I've seen quite old posts about similar.  

But thank you though!

Screenshot 2020-04-13 at 15.01.54.png

Share this post


Link to post
Share on other sites

So I can have this:

exportpersona_relative03.jpg.f18676bfcedcdc32715ce0677e32a1db.jpg

...and specify lowres/ as relative path, and get exports created in the specified location, if I pick at export time "ADPoject" as the root.

But this naturally requires user response -- I am not sure if there even is a way without showing the dialog box?

Share this post


Link to post
Share on other sites
1 minute ago, Sofa Gas Rue said:

Interesting that it works on Win. I've tried with just "low res/slice name" and that works to a sort now it just pops a window up asking where to place the exports, which defeats the purpose in my mind.

The path name you specify is relative to the folder that you specify in the file manager dialog. So, if your original document is in ~username/folder1, for example, and you put lowres/slice name in as the path in the Slices panel, then you can select ~username/folder1 in the file manager dialog and your slice will end up in ~username/folder1/lowres/slice name.


-- Walt

Windows 10 Home, version 2004 (19041.388),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.8.4.693 and 1.8.5.703 Beta   / Affinity Designer 1.8.4.693 and 1.8.5.703 Beta  / Affinity Publisher 1.8.4.693 and 1.8.5.703 Beta.

Share this post


Link to post
Share on other sites
Just now, Lagarto said:

I am not sure if there even is a way without showing the dialog box?

No, there isn't. The dialog box is required to set the base folder for all the slice exports.


-- Walt

Windows 10 Home, version 2004 (19041.388),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.8.4.693 and 1.8.5.703 Beta   / Affinity Designer 1.8.4.693 and 1.8.5.703 Beta  / Affinity Publisher 1.8.4.693 and 1.8.5.703 Beta.

Share this post


Link to post
Share on other sites
9 hours ago, Sofa Gas Rue said:

Interesting that it works on Win. I've tried with just "low res/slice name" and that works to a sort now it just pops a window up asking where to place the exports, which defeats the purpose in my mind.

I am not sure why you say it defeats the purpose (or how it could work in any other way). There has to be a path specified somehow as the one all other paths are relative to, right? Otherwise, the only built-in default path for that would have to be the root level of the drive or maybe the current user's home folder.


Affinity Photo 1.8.4, Affinity Designer 1.8.4, Affinity Publisher 1.8.4; macOS Mojave 10.14.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 
1.8.4.186 & Affinity Designer 1.8.4.4 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.3.1

Share this post


Link to post
Share on other sites
5 hours ago, R C-R said:

I am not sure why you say it defeats the purpose (or how it could work in any other way). There has to be a path specified somehow as the one all other paths are relative to, right? Otherwise, the only built-in default path for that would have to be the root level of the drive or maybe the current user's home folder.

 

Hi R C-R,

Sorry I was not too clear, but yes you are right there needs to be a base path set somewhere. I was just hoping the export itself would go from the source documents path without me having to set it.
Alternatively ( and this would be the same but better ) it would be useful to have a variable called for example 'document root' which would give me the same so I could 'build' the export path automatically since I work of the same folder structure for all my commercial jobs.

This would allow me to have an export preset where I can just as it to export into the high and low res folders within the current project.

Thanks,
Sofus

Share this post


Link to post
Share on other sites
15 hours ago, walt.farrell said:

The path name you specify is relative to the folder that you specify in the file manager dialog. So, if your original document is in ~username/folder1, for example, and you put lowres/slice name in as the path in the Slices panel, then you can select ~username/folder1 in the file manager dialog and your slice will end up in ~username/folder1/lowres/slice name.

Hi Walt.farrell,

Thank you for the clarification, and I suspected that was how to was set up. I was though hoping to get around having to set the 'root' path by using a build-in variable which could be called "root" that would give me the path to the source document, and then build the export path based on that. 

I'll go to great lengths to keep being 'lazy' when it comes to automations and such :) 

Share this post


Link to post
Share on other sites
4 hours ago, Sofa Gas Rue said:

Sorry I was not too clear, but yes you are right there needs to be a base path set somewhere. I was just hoping the export itself would go from the source documents path without me having to set it.

There will not be a source document path if the document is new & has not yet been saved. Now that we have template support, this is quite possible for some workflows. Even if there is it may not be desirable for that to provide the base path for the exports, like if the source is a templates folder or from some cloud based service.

That said, since you mentioned AppleScripts I wonder if you have considered using Folder Actions for some part of your automation process.


Affinity Photo 1.8.4, Affinity Designer 1.8.4, Affinity Publisher 1.8.4; macOS Mojave 10.14.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 
1.8.4.186 & Affinity Designer 1.8.4.4 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.3.1

Share this post


Link to post
Share on other sites
41 minutes ago, R C-R said:

There will not be a source document path if the document is new & has not yet been saved. Now that we have template support, this is quite possible for some workflows. Even if there is it may not be desirable for that to provide the base path for the exports, like if the source is a templates folder or from some cloud based service.

That said, since you mentioned AppleScripts I wonder if you have considered using Folder Actions for some part of your automation process.

Agree there will be cases where no path exists - but then I assume a root variable would return null and prompt the user to supply one if they use that variable.

As for templates and cloud based services I don't quite see an issue, if I understand correctly a template is just a document like any other? and as for cloud services I guess if you work off such then it would be mounted as a drive with a path of sort? - I have no experience with the ins and outs of either, just musing on the topic :)

I've already looked at Folder Actions but was keen on a Affinity solution rather than bulking up on loose scripts. But I've been toying with a more solid setup for client project folder setups with Swift so I could build in a small DB for tracking revisions and handling assorted documents for each project ( not now though ).

Share this post


Link to post
Share on other sites
26 minutes ago, Sofa Gas Rue said:

As for templates and cloud based services I don't quite see an issue, if I understand correctly a template is just a document like any other?

A template is just a document but when you use one via File > New & chose one, it opens as a new, untitled & unsaved document. The template file itself may also be stored in any folder, including many that would not be good choices as the base folder path for exports.

There are a few issues associated with using cloud storage as the destination for exports. One is that any disruption in the internet connection to them could cause that to fail, requiring additional error handling routines to gracefully recover from that. Another is that some cloud services do not actually use the same file system internally that the local app interacts with, which can cause unexpected results.


Affinity Photo 1.8.4, Affinity Designer 1.8.4, Affinity Publisher 1.8.4; macOS Mojave 10.14.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 
1.8.4.186 & Affinity Designer 1.8.4.4 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.3.1

Share this post


Link to post
Share on other sites
3 minutes ago, R C-R said:

A template is just a document but when you use one via File > New & chose one, it opens as a new, untitled & unsaved document. The template file itself may also be stored in any folder, including many that would not be good choices as the base folder path for exports.

There are a few issues associated with using cloud storage as the destination for exports. One is that any disruption in the internet connection to them could cause that to fail, requiring additional error handling routines to gracefully recover from that. Another is that some cloud services do not actually use the same file system internally that the local app interacts with, which can cause unexpected results.

Argh right I see :) - reg the templates they could just be 'unsaved' and then prompt the user to save before using a 'root' variable.  As for the cloud services, I'm sure they are valid points but sounds like absolute edge cases, but I am properly wrong. 

Share this post


Link to post
Share on other sites

Regarding cloud services, there are more edge cases than you might imagine, some involving cloud server or ISP issues & some involving the somewhat unusual way the Affinity apps may access files piecemeal instead of all at once.

Like with unsaved documents, none of these things have to be show stoppers but there have to be some provisions built into the app for dealing with them, just like provisions have to be included in Applescripts & other automated methods to gracefully recover from errors if they are intended to be something one can rely on for any important task.


Affinity Photo 1.8.4, Affinity Designer 1.8.4, Affinity Publisher 1.8.4; macOS Mojave 10.14.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 
1.8.4.186 & Affinity Designer 1.8.4.4 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.3.1

Share this post


Link to post
Share on other sites
9 hours ago, Sofa Gas Rue said:

I was though hoping to get around having to set the 'root' path by using a build-in variable which could be called "root" that would give me the path to the source document, and then build the export path based on that. 

Sounds like a reasonable enhancement to ask for in the Feature Requests forum :)


-- Walt

Windows 10 Home, version 2004 (19041.388),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.8.4.693 and 1.8.5.703 Beta   / Affinity Designer 1.8.4.693 and 1.8.5.703 Beta  / Affinity Publisher 1.8.4.693 and 1.8.5.703 Beta.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.