Capture One Collections & AppleScript
27 Feb 2018 ∞
After the release of Capture One 11 I set to work poring over all of the changes in the most important part of Capture One: its AppleScript library! Phase One made some great additions like including all of the basic ratings (star and colors), plus nearly full control over a variant's adjustments. I've already built scripts that automate bulk processing that couldn't have been done before.
However, one big change (that, admittedly, came in 10, which I skipped) is how collections are returned.
Capture One 10 & 11 return collections in a single array grouped by collection type:
- Session Folders
- Albums
- Smart Albums
- Favorites
Differences with Capture One 9
Contrasted with Capture One 9, which only returned Session Albums and Session Favorites, all in their Capture One order.
(*A Album album*)
(*B Smart Album smart album*)
(*C Album album*)
(*Macintosh HD:Users:edunn:Pictures:Test AS 9:Capture:A Folder: favorite*)
(*Macintosh HD:Users:edunn:Pictures:Test AS 9:Capture:B Folder: favorite*)
(*Macintosh HD:Users:edunn:Pictures:Test AS 9:Capture:C Folder: favorite*)
Favorites did not have names, only file paths, so the output above is a combination of the
name
andfile
attributes.
Script
Samples of collection ordering are returned by the following AppleScript:
tell front document of application "Capture One"
repeat with i from 1 to the (count of collections)
set c to item i in collections
log (name of c as string) & " " & (kind of c)
end repeat
end tell
All of this applies only to Sessions, Catalogues are quite different with their own logic.
Session Folders
Whatever folders are assigned as Capture, Selects, etc. are returned in a fixed order of
- Capture
- Selects
- Output
- Trash
The name of the actual folder is used, so if the Capture folder is set to Foo
it would be (*Foo favorite*)
.
However any given folder is only listed once. For instance, if the same folder is set to both Capture
and Selects
the list returned will be:
(*Capture favorite*)
(*Output favorite*)
(*Trash favorite*)
Albums & Smart Albums
Normal Albums and Smart albums are grouped by type (albums first, smart albums second) and ordered by their sort order in Capture One.
- A Album
- B Smart Album
- C Album
- D Smart Album
- E Album
Returns:
(*A Album album*)
(*C Album album*)
(*E Album album*)
(*B Smart Album smart album*)
(*D Smart Album smart album*)
Favorites
Favorites are returned in order from Capture One, with some caveats. If a favorite is set to one of the Session Folders it will only be listed in its assigned type in the Session Folder section.
For example:
A Folder
B Folder
C Folder
Will return:
(*Capture favorite*)
(*Selects favorite*)
(*Output favorite*)
(*Trash favorite*)
(*A Folder favorite*)
(*B Folder favorite*)
(*C Folder favorite*)
If we set B Folder as the Capture Folder, however:
(*B Folder favorite*)
(*Selects favorite*)
(*Output favorite*)
(*Trash favorite*)
(*A Folder favorite*)
(*C Folder favorite*)
This behavior, however, is not replicated with the standard Session Folders, and even worse isn't consistent in how it works. When initially testing the default Capture folder appeared in the list as both the Capture Folder and a Favorite. Testing again, on a different machine running Build 11.0.0.282 (fdb7335)
, I'm getting different behavior. This might be a bug.
Conclusion and Wishes
Once I figured out exactly what was going on (my initial theory was that favorites were being returned by access date) the logic makes sense. I don't, however, like the new logic as it breaks one of my favorite scripts. In Capture One 9 I was able to reliably determine the position of the Capture Folder in the list of Favorites and move it up and down the list with a keyboard shortcut.
I would propose a hybrid between the old model and the new: list Session Folders both at the top and in place.