Get Clone Variant Position (not ID)

Discussion regarding all scripting related questions
Please DO NOT post to this thread anything that is not directly related to scripting of Capture One.

Get Clone Variant Position (not ID)

Postby murphysm2342 » Thu Jan 23, 2020 8:42 pm

Anyone know if it is possible to get a variant's "Variant Position" (number shown in top right corner when you have a clone variant)? Recipes can add this number into your file name when processing but I'm looking to use that in a different use case and can't find it within the AppleScript.

My use case: I'm building some error correction that will be looking at things like color label, rating and a specific metadata field and prompting the user when errors are found. In most cases I don't want duplicates of the same rating or duplicates of images with this metadata tag. I'm presenting the user with a list of image names so they can choose which one to use and then programmatically fix the incorrect one. This is problematic with clone variants since they contain the same name. I know there are variant ids but these are not visible to the user so would be useless to present it to them.

Is that Variant Position available?
murphysm2342
 
Posts: 4
Joined: Tue Aug 18, 2015 10:23 pm

Re: Get Clone Variant Position (not ID)

Postby murphysm2342 » Thu Jan 23, 2020 8:57 pm

I may have found the answer but would still like confirmation. Within each variant's info is "parent image" and within that is a variant list. You can create a list by setting a variable to "variants of parent image of thisVariant". This should work assuming that the array reflects the position they are in.

So far in playing around it looks like it does match their visual position.
murphysm2342
 
Posts: 4
Joined: Tue Aug 18, 2015 10:23 pm

Re: Get Clone Variant Position (not ID)

Postby Eric Nepean » Mon Feb 17, 2020 6:31 pm

Hi Sean

I have an Applescript somewhere that uses the same idea as you have here.

Its OK for a solution while the script is running, but you have to ask yourself - what happens when the user deletes a variant that it is not last one in the list - deleting variant 2 will mean that variant 3 becomes variant 2, and variant 4, becomes variant 3 - is this going to affect the use of your script, or the use of the script's output?

If necessary I suppose you could hijack one of the IPTC fields and write the variant ID (or some other message) there. Unfortunately, Capture One can't show IPTC fields in the viewer or browser, although IPTC fields can be part of a Filter, Search or Smart Album
Eric Nepean
 
Posts: 678
Joined: Sat Oct 25, 2014 8:02 am
Location: Ottawa


Return to Scripting



Who is online

Users browsing this forum: No registered users and 1 guest