16.5.2 (or .3 depending how you are counting) released last week. Odd for a dot dot release were a number of new features.
Look past the AI fanfare, and there were actually several additions and changes to the scripting capability, something that hasn’t happened since version 12. I will assume (because you are here) that this is what you are interested in, and so this post is only about AppleScript. You can read Alex Svet’s blog if you like masking and things like that.
The release notes only covered a little bit of what was new and lacked some details, hence the reason for this post.
Originals (recipes)
The single biggest change and one I’ve been dreaming of for ages was the addition of Export originals to recipes. If you are not familiar with this feature then the idea is to export (a copy of) the RAW file and its settings to a new destination (and optionally pack this copy as EIP), instead of processing to an RGB bitmap file like tif.
If you’ve ever needed to make an export of RAWs at the end of the day, all neatly organised by rating into folders then this is an absolute game changer.
This capability was always in Capture One via the File>Export menu, but it was annoying to script as it went via a modal window. It also meant effectively one recipe – which meant tracking and rebuilding all the properties for the settings if anything needed to change.
Now this is supported by recipes, you can configure any number of recipes how ever you want, call the recipes independently and most important of all you dont have to go through a modal which was annoying UI wise with several weird bugs and a dog to script against.
New to recipes? This previous post on recipe processing may be of interest.
EX 1. Options for recipe
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
tell application “Capture One” set theRecipeName to “Export Originals” try set theRecipe to recipe named theRecipeName of current document on error tell current document set theRecipe to make new recipe with properties {name:theRecipeName, enabled:true, output format:Original} tell theRecipe — NOTE: — The two options for exporting originals are mutually exclusive workflows. — You can not both pack an original to EIP AND export its settings as a .cos sidecar — because exporting as EIP explicitly includes the settings in the packed file. set packed to true — if you want the settings in the sidecar folder, use include adjustments, but set packed to false — set include adjustments to true end tell end tell end try end tell |
Edit all selected variants
Less useful for serious scripting (as you can always direct scripts against your own selection logic) but this boolean refelects the UI and allows you to at least do (e.g.) a workspace preflight and check its on/off depending on what you want. I’ve seen occasionally uninitiated users press the shortcut for this and inadvertently switch it off without noticing and then go posting on Reddit why nothing is working.
EX 2.1
|
1 2 3 4 5 6 7 8 9 |
tell application “Capture One” if edit all selected variants is false then set edit all selected variants to true display dialog “Edit all selected variants was switched off! I have fixed it.” else set edit all selected variants to true display dialog “Check complete!” end if end tell |
Another preflight use case property that has changed (not added) is the GPU acceleration toggle. This is now one property, not split into UI/processing.
EX 2.2
|
1 2 3 4 5 6 7 8 9 10 11 12 |
— toggle GPU support on/off in 16.5.3 tell application “Capture One” — Enumerated. can be auto or never set theStatus to processing acceleration if theStatus is auto then set processing acceleration to never else if theStatus is never then set processing acceleration to auto end if set theStatus to processing acceleration return theStatus end tell |
Synchronizing (Collection)
From the dictionary: Indicates if this collection is currently in the process of adding or removing images to match what is in the filesystem. Can be set to true for a session folder collection in order to initiate background synchronisation. For catalog folder collections, use the synchronize command instead.
Why? Useful for scripts that rely on the collection to finish syncing content before the rest of the script runs would of in the past required some logic to count variants in the collection, vs files on disk, and proceed if A=B. Now you can run a while loop and check the folder is done before (e.g.) counting, processing, updating metadata etc.
EX 3. Check if a collection is Synchronised
|
1 2 3 4 5 6 7 8 9 10 |
tell application “Capture One 23.16.4.2.1” set synchronizing of current collection of current document to true end tell tell application “Capture One 23.16.4.2.1” repeat while synchronizing of current collection of current document is true delay 0.1 end repeat display dialog “Synchronizing done” end tell |
Variant visible property
Sometimes a user might have a filtered set of variants in the viewer. This boolean can be used to check what the user sees is what you script against.
“Visible” is read only, so if you need to make something true or false, you have to use other methods.
EX 4. variants whose visible is true
|
1 2 3 4 5 6 7 8 9 |
— if a user filter is enabled, this still returns all the variants of the collection tell application “Capture One” set theVars to variants of current collection of current document end tell — this returns the same variants the user sees tell application “Capture One” set theVars to (variants whose visible is true) of current collection of current document end tell |
Leave a Reply