Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rollbahn

macrumors newbie
Original poster
May 17, 2017
3
1
Australia
I am testing out Capture One to switch over from Lightroom and as I shoot film and scan at home I always like to add in the camera and lens data. LR has plenty of plugins for this task but in Capture One it looks like my only option to change Camera Make/Model and Lens etc in the EXIF is to run exiftools via an Applescript.

I have tried a few things and had a good look around online but can't see how to achieve what I want:

1. Highlight one or more images in Grid view in Capture One
2. Go to the menu and choose the script and have it loop through and update the EXIF data on the selected images only.

The code below is what I have tried so far from bits and pieces I have found but I get an error "No File Specified"as I can't figure out how to grab the current file/s names/paths and stick them at the end of the exiftools command and change it as it loops through to update each image's EXIF. Perhaps the whole thing is wrong?

Any help would be great - thanks.

Code:
tell application "Capture One 10"
   set selectedVariants to (get selected variants)
   tell document 1 -- as far as I can tell there is only  ever 1 document     
      if selectedVariants is {} then
         display notification "No images selected -  select one or more images"
      else
         repeat with counter from 1 to count of selectedVariants
            do shell script "/usr/local/bin/exiftool -lens='Leica Summicron-M 35mm f/2' "/path/to/file/image.jpg""
         end repeat
      end if
   end tell
end tell
 

superscape

macrumors 6502a
Feb 12, 2008
937
223
East Riding of Yorkshire, UK
Hi,

I don't know anything about "Capture One", so I can't help you there. However, there's an obvious error in your exiftool line. It should be something like:

Code:
do shell script "/usr/local/bin/exiftool -lens='Leica Summicron-M 35mm f/2' " & quoted form of ("
/path/to/file/image.jpg")

Hope that's of some help, at least.
 

kryten2

macrumors 65816
Mar 17, 2012
1,115
99
Belgium
You can do something like :

Code:
tell application "Capture One"
    set selectedVariants to get selected variants
    repeat with i from 1 to number of items in selectedVariants
        set this_item to item i of selectedVariants
        set theID to id of (parent image of this_item)
        --do shell script "/usr/local/bin/exiftool -lens='Leica Summicron-M 35mm f/2' " & quoted form of theID
        --Remove the log statement when no longer needed. Used just for demo
        log theID
    end repeat
end tell

The Replies from running the script :

Code:
tell application "Capture One"
    get selected variants
        --> {variant 1 of document "Capture One Catalog", variant 2 of document "Capture One Catalog"}
    get id of parent image of variant 1 of document "Capture One Catalog"
        --> "/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/06_02.jpg"
    (*/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/06_02.jpg*)
    get id of parent image of variant 2 of document "Capture One Catalog"
        --> "/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/32.zip-85.jpg"
    (*/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/32.zip-85.jpg*)
end tell

Note: Tested on Yosemite with Capture One Pro 8.3.4
 

rollbahn

macrumors newbie
Original poster
May 17, 2017
3
1
Australia
Hi,

I don't know anything about "Capture One", so I can't help you there. However, there's an obvious error in your exiftool line. It should be something like:

Code:
do shell script "/usr/local/bin/exiftool -lens='Leica Summicron-M 35mm f/2' " & quoted form of ("
/path/to/file/image.jpg")

Hope that's of some help, at least.

Thanks but I just left that in by mistake when I took out an actual path yesterday to post this code. The real issues are outside of that line but I appreciate the help.
[doublepost=1495142979][/doublepost]
You can do something like :

Code:
tell application "Capture One"
    set selectedVariants to get selected variants
    repeat with i from 1 to number of items in selectedVariants
        set this_item to item i of selectedVariants
        set theID to id of (parent image of this_item)
        --do shell script "/usr/local/bin/exiftool -lens='Leica Summicron-M 35mm f/2' " & quoted form of theID
        --Remove the log statement when no longer needed. Used just for demo
        log theID
    end repeat
end tell

The Replies from running the script :

Code:
tell application "Capture One"
    get selected variants
        --> {variant 1 of document "Capture One Catalog", variant 2 of document "Capture One Catalog"}
    get id of parent image of variant 1 of document "Capture One Catalog"
        --> "/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/06_02.jpg"
    (*/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/06_02.jpg*)
    get id of parent image of variant 2 of document "Capture One Catalog"
        --> "/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/32.zip-85.jpg"
    (*/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/32.zip-85.jpg*)
end tell

Note: Tested on Yosemite with Capture One Pro 8.3.4

Awesome thanks that looks like it may do the trick. I'll give it try today - appreciate your help!
 

rollbahn

macrumors newbie
Original poster
May 17, 2017
3
1
Australia
You can do something like :

Code:
tell application "Capture One"
    set selectedVariants to get selected variants
    repeat with i from 1 to number of items in selectedVariants
        set this_item to item i of selectedVariants
        set theID to id of (parent image of this_item)
        --do shell script "/usr/local/bin/exiftool -lens='Leica Summicron-M 35mm f/2' " & quoted form of theID
        --Remove the log statement when no longer needed. Used just for demo
        log theID
    end repeat
end tell

The Replies from running the script :

Code:
tell application "Capture One"
    get selected variants
        --> {variant 1 of document "Capture One Catalog", variant 2 of document "Capture One Catalog"}
    get id of parent image of variant 1 of document "Capture One Catalog"
        --> "/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/06_02.jpg"
    (*/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/06_02.jpg*)
    get id of parent image of variant 2 of document "Capture One Catalog"
        --> "/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/32.zip-85.jpg"
    (*/Users/kryten/Pictures/Capture One Catalog.cocatalog/Originals/2017/05/18/4/32.zip-85.jpg*)
end tell

Note: Tested on Yosemite with Capture One Pro 8.3.4

Thanks very much kryten2 - I've run through a few tests and it all works superbly.
 
  • Like
Reactions: superscape
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.