Jump to content
You must now use your email address to sign in [click for more info] ×

I'm on a Mac I have my own DAM( Digital Assets Management ) tool


Recommended Posts

I would like to be able to make the selection of n images in the DAM( Think Aperture as a cataloging tool, but no editing, ) and would like to add a function there to open the current selection of images as *[ a stack ] in Affinity Photo.

How?

Can I call Affinity remote?

 

Where the content of *[ ] could be anything that would benefit the user, such as:

[ append selection to frontmost workspace ]

[ open selected files individually ]

Link to comment
Share on other sites

  • Staff

Hi ggt667 :)

Other external DAMs (such as Lightroom) are able to open images in Affinity Photo, so I see no reason why you could not use something like the following command in terminal to launch an image in Affinity:

open -a "Affinity Photo.app" test.jpg

Replace test.jpg with the file name and add the file location - this should open the image in Affinity Photo.
I tested the above code in terminal with test.jpg on the desktop and it functioned as expected. I hope this helps!

Please note -

I am currently out of the office for a short while whilst recovering from surgery (nothing serious!), therefore will not be available on the Forums during this time.

Should you require a response from the team in a thread I have previously replied in - please Create a New Thread and our team will be sure to reply as soon as possible.

Many thanks!

Link to comment
Share on other sites

@ggt667, if you are interested in using Terminal for your project as @Dan C suggests, you might find it useful to refer to the OPEN(1) man page for the available options. You probably already know how to open a man page in Terminal, but you may not know you can use Terminal to open a man page in Preview.app, which allows you to save the page as a PDF file, which might be more convenient.

So for example, the following will open OPEN(1) in Preview on a Mac:

man -t open | open -f -a /Applications/Preview.app

Either way, it should be obvious that you can open selected files individually by adding their paths after the first file reference (test.jpg in the example), but while you can pass any −−args you want to Affinity Photo in the command, Affinity Photo probably will ignore them, meaning you won't be able to add them as a stack or anything like that.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

7 hours ago, R C-R said:

...but you may not know you can use Terminal to open a man page in Preview.app, which allows you to save the page as a PDF file, which might be more convenient.

Or you may not know, that there are even tools like ManOpen and ManDrake which are even more comfortable to use here, especially also when writing own man pages and also when previewing existing ones. Those tools can aslo easily save to PDF or even do convert a man page into HTML (ManDrake). ;)

manopen.thumb.jpg.79141f92e17ccc9aac6f4ef0a65d80e7.jpg

mandrake.thumb.jpg.9536e08bf11f9be6b1f1556265a3a4e5.jpg

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

9 hours ago, Dan C said:

Hi ggt667 :)

Other external DAMs (such as Lightroom) are able to open images in Affinity Photo, so I see no reason why you could not use something like the following command in terminal to launch an image in Affinity:


open -a "Affinity Photo.app" test.jpg

Replace test.jpg with the file name and add the file location - this should open the image in Affinity Photo.
I tested the above code in terminal with test.jpg on the desktop and it functioned as expected. I hope this helps!

There are no issues opening 1 - one file, the issue is that I would like to open a selection in context.

I assume this will require som AppleEvents or parameters on the Affinity Photo side of things.

Link to comment
Share on other sites

17 minutes ago, ggt667 said:

There are no issues opening 1 - one file, the issue is that I would like to open a selection in context.

I assume this will require som AppleEvents or parameters on the Affinity Photo side of things.

The APh app does handle several image files when those are passed as arguments via a terminal call, for example ...

Quote

open -a "Affinity Photo.app" file1.jpg file2.jpg file3.png ...

... so it's a matter how it's called from the DAM software via a selection of files. And how the selected files (path/name) are passed over then, in which order etc.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Good, that is not an issue, how can I say that this selection should be a stack?

 

There must be something like:

Quote

open -a "Affinity Photo.app -stack" file1.jpg file2.jpg file3.png ...

or

Quote

open -a "affphoto:///file/tmp&file1.jpg&file2.jpg&file3.png&-generatestack

or similar

 

Not sure what `affinity-photo://` does.

Link to comment
Share on other sites

25 minutes ago, v_kyr said:

Or you may not know, that there are even tools like ManOpen and ManDrake ...

I have used ManOpen for years. It has not been updated since 2012 but it still runs fine on High Sierra. I mentioned the Preview trick because some users might not want to add anything new to their system.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

2 minutes ago, ggt667 said:

how can I say that this selection should be a stack?

AFAIK, you can't. That would require passing an arg (argument) to Affinity Photo & like I mentioned earlier I think AP would just ignore it. I doubt there is a way to do it with AppleScript either, because Affinity Photo only responds to the minimum required AppleScript verbs (like to open files or launch or quit the app).

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

15 minutes ago, R C-R said:

I have used ManOpen for years. It has not been updated since 2012 but it still runs fine on High Sierra. I mentioned the Preview trick because some users might not want to add anything new to their system.

Sometimes oldies are still goldies, loved that since it resembled what I've used for years on NeXTstep/OpenStep in the pasts!

Though I once wrote my own man page tool (something in behavior more like ManDrake) also in a more platform portable manner (runs nearly everywhere).

filemenu.gif.3c05017a7417d8cddaf3179c30883967.gifcontextmenu.gif.d19599456bf37fdcddb3b6765b5c6516.gif

combocompletion.gif.916f237919ee682841386636d34b2621.gif

abbreviations.gif.1460b3eaeb2b23dbb99f5cc1d2c8cd23.gif

mwscreen.jpg.66fc270290fbcbca36fdbc6f72e00dd4.jpg

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

9 hours ago, R C-R said:

@ggt667, if you are interested in using Terminal for your project

I do prefer to use NSWorkspace or link protocols; such as ```affinity-photo```, perhaps protocols could be added like: ```affinity-photo-stack```

```affinity-photo-develop```

```affinity-photo-export```

```affinity-photo-appendSelectionToFrontmostWorkspaceAsLayers```

```affinity-photo-and```

```affinity-photo-so```

```affinity-photo-on```

 

Link to comment
Share on other sites

On 3/26/2019 at 10:28 AM, Dan C said:

Hi ggt667 :)

Other external DAMs (such as Lightroom) are able to open images in Affinity Photo, so I see no reason why you could not use something like the following command in terminal to launch an image in Affinity:


open -a "Affinity Photo.app" test.jpg

Replace test.jpg with the file name and add the file location - this should open the image in Affinity Photo.
I tested the above code in terminal with test.jpg on the desktop and it functioned as expected. I hope this helps!

In essence I would like to do

Quote

open -a "Affinity Photo.app" GGT_14802.NEF GGT_14803.NEF GGT_14807.NEF GGT_14809.NEF GGT_14812.NEF GGT_14815.NEF GGT_14817.NEF GGT_14833.NEF -asStack

 

Link to comment
Share on other sites

25 minutes ago, ggt667 said:

I essence I would like to do ...

I suspect that would require Serif adding a fairly extensive set of API's to the app, along with sufficient documentation to use them. My guess is that will never happen, or at least not in the foreseeable future, for several reasons. Among them:

  • Much of the app is considered to include proprietary trade secrets, so Serif is unlikely to make anything that reveals them publicly available.
  • One of the goals for the Affinity apps is cross-platform parity, so unless they could add an equivalent set of API's to the Windows version, they probably would not be interested in making this a Mac-only feature.
  • It would most likely require major revisions to the code base, which would have implications for the other Affinity apps that share it, which in turn would require a lot of testing to make sure it all worked without introducing bugs in any of the apps.
  • It isn't likely to be something many users would take advantage of, so it would be hard to justify the time & money required to develop & support it.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

2 hours ago, ggt667 said:

I do prefer to use NSWorkspace or link protocols; such as ```affinity-photo```, perhaps protocols could be added like: ```affinity-photo-stack```

```affinity-photo-develop```

```affinity-photo-export```

```affinity-photo-appendSelectionToFrontmostWorkspaceAsLayers```

```affinity-photo-and```

```affinity-photo-so```

```affinity-photo-on```

 

Well generic things like ...

NSWorkspace.shared.openFile("/Myfiles/myfile.jpg", withApplication: "Affinity Photo")

... for launching the Affinity app from an own app and passing over a file as argument should work , since it's nothing Affinity specific here. - For other (maybe) accessible services it's difficult to tell what might be already there to reuse or not, since nothing is documented or ever propagated. AFAIK there is no real programmers API or the like available. Also the CLI access is limited to just open as args passed over files in single windows. I doubt other things like batch processing, stacking etc. are somehow made available via services here.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

I would prefer an approach like this:

Quote

let currentURL: URL = URL( string: "affinity-photo-stack:///media/GGT_14802.NEF&/media/GGT_14803.NEF&/media/GGT_14807.NEF&/media/GGT_14809.NEF&/media/GGT_14812.NEF&/media/GGT_14815.NEF&/media/GGT_14817.NEF&/media/GGT_14833.NEF" )!

_ = NSWorkspace.shared.open(
                [ currentURL ],
                withAppBundleIdentifier: "com.seriflabs.affinityphoto",
                options: .andHideOthers,
                additionalEventParamDescriptor: nil,
                launchIdentifiers: nil
            )

 

Link to comment
Share on other sites

39 minutes ago, ggt667 said:

I would prefer an approach like this:

If support for that is something you want added to Affinity Photo, you can try adding a request for it in the Suggestions for Affinity Photo on Desktop forum, but for the reasons already mentioned it does not seem likely it will be implemented anytime soon, if ever.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 3 months later...
On 3/27/2019 at 12:12 AM, v_kyr said:

Well generic things like ...


NSWorkspace.shared.openFile( "/Myfiles/myfile.jpg", withApplication: "Affinity Photo" )

 

I will go with this one for now.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/5/2019 at 11:02 AM, ggt667 said:

I will go with this one for now.

I do use such an associated call in a custom tracing app, where I route on demand the traced vector result into Designer then. Works good so far.

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
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

Terms of Use | 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.