Make your own features series: Ep1. Reset Crop
Make your own features series
Every now and again I see feature requests that are very obvious but will probably never be implemented due to the fact the perceived commercial impact doesnt interest the bean counters. This was partly the reason I learned to script Capture One, and why scripting such a valuable facet of Capture One: why wait when you can make solutions yourself.
So, (with the best will and time allowing) this series will focus on solving and building for unresolved feature gaps in Capture One.
Ep 1. How can I reset crop via Shortcut?
This week I saw a request for resetting the crop (which you can do via UI) but this request is via a shortcut (because workflow duh). Sounds obvious and yet, not possible.
The problem has two parts (in order of expected UX):
Doing the function is the job of the script, so half way there. Shortcuting a script is harder BUT can be done as described in one of my first posts on the Shoot Machine project here.
Script
The syntax for the script is actually quite simple. We’ll reuse some of the code from the post on conditonal processing as we need to focus any crop commands on variants under a selection
1 2 3 4 5 6 7 8 9 10 11 12 13 |
tell application "Capture One" tell current document tell current collection repeat with theVariant in (variants whose selected is true) tell theVariant -- add new bit here end tell end repeat end tell end tell end tell |
Next we need to affect the crop, and this could be done in a few ways but by far the simplist is the command – “maximum crop”
What this does is set the crop to the largest possible drawable, but limiting that maximum based on the current rotation and any lens profile restrcitions, which is neat as this means we limit the reset the crop, but leave any other geometric corrections alone.
If we check the dictonary for syntax, Maximum crop command requires a variant object to act on. Again, few ways to do this, but as we all ready have working code to tell a variant object, we can insert just the command inbetween “tell theVariant”
the final script look slike this:
1 2 3 4 5 6 7 8 9 10 11 |
tell application "Capture One 23.16.1.0.126" tell current document tell current collection repeat with theVariant in (variants whose selected is true) tell theVariant maximum crop end tell end repeat end tell end tell end tell |
Save the script in the application folder and set up your shortcut. You can now reset the crop from the hotkey.
Hi, i follow your blog since few time, very interesting !
here, this is my own script delete crop i use on set :
tell the application “Capture One 23”
tell the primary variant
maximum crop
end tell
set thevariant to the primary variant
set rotation of adjustments of thevariant to 0
end tell
It is a bit different, it only works on the selected Variant.
Thanks to you I will be able to update it.
Also I added a reset rotation with :
set thevariant to the primary variant
set rotation of adjustments of thevariant to 0
Maybe it can be improved too
Indeed, there is much you can do, and rotation may very well make sense to add. Thanks for following!