Make your own features series: Ep2. Flip 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 2. How can I flip the crop? Lightroom can flip the crop’s orientation using the “x” key…

This week on Reddit I saw a request for flipping a crop’s orientation.

The problem has two parts (in order of expected UX):

  • Shortcut
  • Do the function
  • 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 stupidly simple.

    What this does is simply get the current length of X and Y, and then plugs Y into X and vice versa.

    Save the script in the application folder and set up your shortcut. You can now flip the crop from the hotkey.

    Output events

    This week (though it’s taken nearly a year on and off) I finalised another Capture One app – CheckOut – based on the Output events feature. You can find the app in the store here.

    Scripting Output events

    Output events are script objects that record a variants processing history. Basically every time you process a file in C1, the app logs some data about what was done automatically. You can then query the the variant for this data. Without these, the script designer would have to create “watch folder” monitor scripts, or use Capture One’s event script framework while the user is working – you can instead just ask any varaint at any time “what has been processed from you, and where did it go?” and get the answer.

    Available Output event values

    Every time you process you create an Output event, so a variant can contain many. A single output event object contains:

  • Date: (date) date of processing event
  • Exists: (bool) does the child file exist on disk in the directory it was processed to? ***
  • File: (file) applescript file object for the output file
  • ID: (text) unique Id for the output event
  • Path: (text) unix style path of the output file
  • Example

    This simple example demonstrates how to log all the (unix formatted) destination paths of files processed (to date) from the primary variant


    The CheckOut app

    The initial idea for CheckOut came from some digi friends and was a simple concept – run an app the end of the day and it will tell you if you processed everything that was Captured into the session – and a perfect use case for Output events.

    While it sounded simple on the surface, at scale the details exploded pretty quickly.

    For a few files it was fine, but presenting a summary for a full day of maybe 2-3000 shots over 30 favorites was something else entirely: I thought Excel for Mac would make a decent candidate to dump data into and make reports – primarily as this is also scriptable* so bridging the two apps should be relatively straightforward**.

    Then there were questions like; What if the file was processed more than once? or with different recipes? what if the files are not on disk any more? How to display all this in a meaningfull way? How to track everything that is processed?

    Implementation

    The resulting app is 100% applescript, bridging C1 and Excel. On run, the app will:

    Check the current session for the output events of every variant that exists in session favourites.
    Fetch and discombobulate all the data to a new Excel doc in 2 review sections.
    A summary view for counts, in and out
    A detail view for a file by file breakdown/errors by event

    The app deals with theoritcially 2 workflows:

  • 1:1 – 1 RAW file has 1 processing event
  • 1:many – 1 RAW file has many outputs
  • To make a clean, readable solution for both was tricky as the scenario of multiple output events created complex data structures. To try and solve this there are two views. A basic summary and a detail view.

    The basic summary view checks counts of all the basics for the session. Favourites, files, basic output counts. Basically all the files in and files out.

    The detail view is a view of each RAW file, its spawned child files and if the file is still on disk where it was sent to. If your workflow requires procesisng more than once, this area will contain more detailed information on job success/fail.

    Basic summary view

    Basic summary panel is color coded when assuming the 1:1 relationship.

  • Green – reconciled: If every RAW has at least one output event, numbers should match (meaning at least nothing is unprocessed)
  • Yellow – warning: usually the counts don’t match, either multiple exports or you are missing processing.
  • Red – is rare but means empty folder
  • The Output summary on the right is running counts of how many Jpegs and how many Tiffs the session has output, and its parent folder path.

    If everything has been processed perfectly, all cells should be green, counts will all match.

    Detail view

    The extended view summary does a blow by blow list for each and every file by favourite folder. It tells you which files are problems and why, how many times it was processed, if it is still on disk etc. Its much more useful for finding problems in complex jobs.

    WHy this? Well there is no recipe “fingerprint” in the scripting interface to know what came from what recipe so impossible to know the intention. For example, processing with 2 separate recipes which are both jpeg, can only be interepreted as “2 jpegs, processed twice”. In this case, the basic view is marked yellow and “multiple” in the output area. This less than ideal problem is why the detail view exists – you can see the folder has questionable events, then check the advanced and see if everything is green.

    The detail view is also color coded.

  • Green – If the RAW file’s output events are all accounted for.
  • Yellow – If the RAW’s output events have problems. See the actual error logged for the reason.
  • Red – If the File is not processed.
  • Limitations

    There is a fundemental limitation of Output events, in that the events log the path of output when a variant is processed, so successful reconciliation requires the output file needs to still be on disk in the location it was processed in for it to pass inspection. Basically if the output file cant be found in the folder to which it was initially processed, the outut will be logged as missing or deleted.


    * a model designed by the devil himself
    ** not at all
    *** the “exists” enum is broken and doesnt work. Instead you have to try to log the file alias for an event (true) which will (a feature of alias’) error if it doesn exist (false).

    Check Out

    Check Out
    This version of the application is for all versions (12+) of Capture One. Application delivered as .dmg file.

     Buy Now View Cart

    Support notes

    • This version is for all versions (12+) of Capture One (tested on 22 and 23)
    • Tested on Monterey. Mac only.
    • Sessions supported.
    • Requires MS Excel (desktop app) installed (16.74 tested).

    The purchase and licensing entitles the app to be used by 1 user. For bulk licensing contact us.


    What is it?
    This app is designed to create a report of the sessions processing history, resulting in an Excel doc with all the info.

    What does it do?
    The functionality is enabled simply by running the app – when it is run it will open Excel and transfer the info from Capture One.

    Who is it for?
    Useful for digis wanting a sanity check on processing jobs.

    How do I use it?
    Once installed from the dmg, just click-to-run.


    Install notes

    Run the .dmg and drag drop the app to applications

    Once installed to applications, I recommend referencing the install in the dock for easy access. Drag the app from applications to the dock to do this. You can also install it to Capture One’s scripts menu as per the article here – but be sure to copy the installed application reference – not the .dmg.

    After running the .dmg and installing, on first run you will see this dialog warning that this is a script file and needs to interact with another app/s to work. These are normal for script applets. The app is otherwise code signed and stapled in accordance with Apple guidelines. Press OK for any dialogs encountered.

    Examples:

    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):

  • Shortcut
  • Do the function
  • 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

    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:

    Save the script in the application folder and set up your shortcut. You can now reset the crop from the hotkey.

    Match Total Exposures

    Updated: 30 June 2022

    Since this post, 15.3.0 was released and introduced a bug that can hang even crash when using this app.

    15.3.1 was just released today which seems to be more stable, but there is a huge performance regression instead, which (while it now works again) makes this application VERY slow to work on files. I can see no workaround and have reported it.


    It’s been a really long time since my last post as I’ve been pretty busy with other things. Home again, home again… jiggity jig.

    Last year (maybe?) I started publishing a series of ideas as apps I thought might be useful to Digis, then work picked up and I had to abandon blogging to pay the bills.

    One app I had not finalised was Match Total Exposures – something I wanted to emulate from the Lightroom feature.

    If you don’t know it, the idea is to bring up (or down) the exposure of a batch of images, to match the exposure of a “hero” image. This is useful for bursts/brackets/series of images (of similar content) shot in challenging conditions, and the exposure has varied a bit in the set.

    Fig 1. Batch of images imported – with varied exposure

    Fig 2. Select the primary and adjust to required exposure

     

    Fig 3. Select the rest in the set and run the script

    Fig 4. Image exposures are now even

     

    This typically involves using a keen eye to move adjustment sliders, or (for the advanced user) Capture One has the excellent Normalise tool (though this still requires a manual interaction with each image). A bit time consuming for big batches, and something ripe for automation.

    Anyway, the first app was a failure – largely due to underestimating the approach. The first app used the exposure evaluation tool (that little green/red bar that tells you if your shot is over/under) to gauge exposure.

    The available parameters from the scripting interface were simply too primitive, and the exposure tool itself had some very odd compression when deciding over-exposure.

    I recently revisited the idea and tried again using a new, much more complex methodology using multiple readouts in a matrix (sort of copying how matrix metering works) – and the second iteration is much improved in terms of results, so much so, I have decided to release the solution.

    The app itself I have decided to release for free. If you like it and it works for you, please consider supporting Shootmachine.co by looking at my other apps for sale. All proceeds go into keeping the site running.

    The app is available from the store here.

    /Jim

    Match Total Exposures

    Match Total Exposures (for Capture One 22)
    Application delivered as .dmg file.

     Buy Now View Cart

    Support notes

    • This version is for Capture One 22 only
    • Tested on Monterey. Mac only.
    • Sessions and Catalogs supported.

    What is it?
    This app is designed to match the exposures across a batch. Read more on the blog here.

    What does it do?
    Takes the primary variant as source and tries to match the others in the selection to it.

    Who is it for?
    Photographers. Techs bored of fixing photographer’s wild brackets.

    How do I use it?
    Select a batch of variants exhibiting similar content, but different exposures. Adjust the primary’s exposure to taste. Run the app. Images will adjust to match the primary.


    Known issues

    15.3.0 introduced a bug that can hang even crash when using this app.

    15.3.1 was just released today which seems to be more stable, but there is a huge performance regression instead, which (while it now works again) makes this application VERY slow to work on files. I can see no workaround and have reported it.

    Any and all builds prior to 15.3 should still work as designed.


    Installation

    Run the .dmg and drag drop the app to applications

    Once installed to applications, I recommend referencing the install in the dock for easy access. Drag the app from applications to the dock to do this. You can also install it to Capture One’s scripts menu as per the article here – but be sure to copy the installed application reference – not the .dmg.

    After running the .dmg and installing, on first run you will see this dialog warning that this is a script file and needs to interact with another app/s to work. These are normal for script applets. The app is otherwise code signed and stapled in accordance with Apple guidelines. Press OK for any dialogs encountered.

    Example:


    Style Pack Maker

    Style Pack Maker (for Capture One)
    Application delivered as .dmg file.

     Buy Now View Cart

    Support notes

    • This version is for Capture One 20, and Capture One 21
    • Tested on Catalina and Mojave. Mac only.
    • Sessions and Catalogs supported.

    The purchase and licensing entitles the app to be used by 1 user. For bulk licensing contact us.


    What is it?
    This app is designed to make Style Packs for use in Capture One.

    What does it do?
    Packs folders of styles into the official, distributable .costylepack format.

    Who is it for?
    This app is for anyone wanting to share styles in the CO community by using the official bundling/format.

    How do I use it?
    Either click to run (and pick the folder) or drop the folder on the app icon to pack the files into a style pack.


    Install notes

    Run the .dmg and drag drop the app to applications

    Once installed to applications, I recommend referencing the install in the dock for easy access. Drag the app from applications to the dock to do this. You can also install it to Capture One’s scripts menu as per the article here – but be sure to copy the installed application reference – not the .dmg.

    After running the .dmg and installing, on first run you will see this dialog warning that this is a script file and needs to interact with another app/s to work. These are normal for script applets. The app is otherwise code signed and stapled in accordance with Apple guidelines. Press OK for any dialogs encountered.

    Example:


    Chicken Nuggets

    This week I was working on a commission for a client. In the solution I needed to include a “technical” Style (a Style with certain parameters (meta data, flags) that aren’t necessarily typical of the generic Styles use-case). Then I realised: there was no way to really send Styles in a convenient way.

    I build a lot of custom install stuff for Capture One, automating the process of setup, shortcuts, dependencies etc, that help simplify and scale installations, but this seemed a little unsuitable for a Style. Then I remembered Style Packs.

    Chicken Nuggets

    I want to preface this next bit by saying that as a creator (of things) I’m pretty allergic to the commercial pre-packing of the creative process. It commoditises creativity and is pretty egregious for a product considering who Capture One is for. Dive deeper, and the hidden cost is one that robs the user twice – once from your bank account because you just paid twice for the functionality the app already provides, and then again from your brain because you learned absolutely nothing along the way.

    It’s like… microwave meals served to chefs. Speaking of chefs, it reminds me of that episode of Jamie Oliver trying to convince the kids that Chicken nuggets are utter shit… because it’s perfect allegory for what the current Style Pack market offers.

    Unlike nuggets though, there remains a bad after taste because the pricing is just utterly absurd and, as a user, you are not invited to the party.

    Build better

    But, take away the insipid commercialism and Styles are actually useful, so: back to my original problem – I want the sharing of them to be easier. If (as an altruistic bonus) the market place were a bit more democratic by allowing users to make and share their own content as a result, that would also be nice.

    The Capture One support for user style-management has not really improved in this area since Style Packs became an official product. For example – there is still no solid import/export workflow for creators wanting to share what they have. So the first thing to do make some tooling.

    Style Pack Maker

    The Pack “technology” is little more than special zip file containing the Styles and so it was actually pretty easy to make a 3rd party solution.

    The result was a fairly simple script applet (saved as .app) that will take any folder (of saved Capture One Styles) as click-and-pick or drag-and-drop, and turn it into a ready made Style Pack for distribution.

    If you would like to collaborate/modify/add to the project, the code is available on my Github repo here.

    I did think originally of just posting this tool in the Store and charging for it but it it didn’t align with how I feel on the current Style Pack marketplace. So alongside a Store product for those who want it, I have decided to also open-source the source code for the “Pack Maker app” for free personal use.

    Making your own pack maker

  • Copy the code from the GitHub repo (here) to your script editor.
  • Save it as an .app on the desktop.
  • Using the app

    Once you have a created a folder of styles in C1:

  • Either double click the app – and pick a folder from the finder containing Styles
  • or

  • Drag/drop the folder of Styles onto the applet.
  • My hope is that this is a small step to a more vibrant marketplace by making a more community driven platform.

    NOTE: Commercial vendors

    Obviously this post is in the spirit of making the packs format more accessible so the community can share for free. If you plan to sell your resulting Style Packs or are a commercial vendor of Style Packs and use this information, then please buy the app from the Store and support the project.

    Event Scripting

    Events are the coolest way to utlize automation scripting, however the infrastructure for it is complex and pretty impenetrable for the uninitiated, so I wrote this article.

    The idea of events is that Capture One will initiate scripts automatically and repeatedly when a particular event happens. This means you can develop and extend Capture One’s behaviour to be reactive to certain repetitive conditions. Examples might be:

  • As soon as an image is captured, process it.
  • When I scan this bar code, do a vLookup in Excel and give me all the data for the product
  • The events are usually only needed to be set once – which is great as it becomes a fire and forget type configuration.

    There are several “event” properties in Capture One (which once set) will react to specific processes.

    The current list of available events are:

    Barcode Scanned (v12.1 Enterprise only)
    Runs (a script) when a code scan is completed
    Example: turn the barcode into a capture folder

    Import Done (’21 14.0.0 onward)
    Runs (a script) after every Import event is completed

    Capture Done
    Runs (a script) after every Capture is taken over the tethered connection
    Example: automatically process the capture

    Batch Done
    Runs (a script) on completion of a batch of images (processing)
    Example: send an email to the retoucher when the job has finished processing to the server

    Processing Done
    Runs (a script) after every image in the batch queue completes
    Example: pipe the resulting single file to additional processing in ImageMagick

    Live view Done
    Runs (a script) when Live View is closed

    Live view will Close
    Runs (a script) when Live View is about to Close

    Live view became ready
    Runs (a script) when Live view has become ready


    How to use event scripts

    To configure these events, you actually need two scripts (there is no official way to do it in UI): a script which sets up the event property with the script to run (A), and the script that runs when called (B). The example below is for Barcode Scanned, but the principle is the same for all event properties.

    Fellow automation guru Emory Dunn has actually made a plugin for bypassing this step and setting scripts – kudos sir – this should really be in the application. Get it here!

    The workflow though without this for the user will then be something thus:

  • Run a setter script
  • Every time an happens, the script is invoked automatically
  • Setter

    This is an example script which “assigns” the script to the event property.

    In this example the setter script (A) is designed as a toggle, and is kept in the same directory as the event script (B). Doing it as a toggle, means you can run it once to turn on the behaviour, and again to turn it off. You can reuse this for all event types by just making sure you change the right event property and script name.

    Event script

    The next part is the event script (B) and is saved as myScanScript.scpt in the same directory you keep the setter script.


    Commercial application

    Should this be interesting, but you don’t want to make it yourself, I currently have two “event products” in the web-shop based on this technology, with commercial application:

    Process On Capture
    Auto Reset Batch Counter

    Process On Capture

    Process On Capture (for Capture One ’21)
    A version of the application for Capture One 21. Application delivered as .dmg file.

     Buy Now View Cart

    Support notes

    • This version is for Capture One 21 (all versions but tested on 14.1).
    • Tested on Catalina and Mojave. Mac only.
    • Sessions and Catalogs supported.

    The purchase and licensing entitles the app to be used by 1 user. For bulk licensing contact us.


    Process On Capture (for Capture One ’22)
    A version of the application for Capture One 22. Application delivered as .dmg file.

     Buy Now View Cart

    Support notes

    • This version is for Capture One 22 (all versions but tested on 15.3).
    • Tested on Monterey. Mac only.
    • Sessions and Catalogs supported.

    The purchase and licensing entitles the app to be used by 1 user. For bulk licensing contact us.


    Process On Capture (for Capture One ’23)
    A version of the application for Capture One 23. Application delivered as .dmg file.

     Buy Now View Cart

    Support notes

    • This version is for Capture One 23 (all versions but tested on 16.2).
    • Tested on Monterey. Mac only.
    • Sessions and Catalogs supported.

    The purchase and licensing entitles the app to be used by 1 user. For bulk licensing contact us.


    What is it?
    This app is designed to watch for incoming tethered shots and process them as soon as they land in CO (using whatever recipes you have enabled).

    What does it do?
    The functionality is enabled simply by running the app – while it is open, CO will process shots automatically (icon in the dock will change to green to indicate “on”). To disable the service, just quit the app.

    Who is it for?
    Useful for event photographers working solo (where you might have a printer watch folder on output), eCom, or other such scenarios where you just want to bypass all the editing bit and just want instant processing with the configured defaults/capture styles etc.

    How do I use it?
    Once installed from the dmg, just click-to-enable. In CO, enable at least 1 recipe and shoot. Images will be processed automatically. While it does support multiple recipes, shooting 10fps with several recipes enabled may require you have a supercomputer to handle the overhead.


    Install notes

    Run the .dmg and drag drop the app to applications

    Once installed to applications, I recommend referencing the install in the dock for easy access. Drag the app from applications to the dock to do this. You can also install it to Capture One’s scripts menu as per the article here – but be sure to copy the installed application reference – not the .dmg.

    After running the .dmg and installing, on first run you will see this dialog warning that this is a script file and needs to interact with another app/s to work. These are normal for script applets. The app is otherwise code signed and stapled in accordance with Apple guidelines. Press OK for any dialogs encountered.

    Examples:


    Using the app

    1. The app is designed as a simple toggle. Launch the app from the dock once – this will enable the processing on capture. The app icon turns green to indicate the capture done event is active.

    2. If you want to disable the behaviour, quit the app – this will disable the processing on capture.