Selective copy and apply of settings

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

Selective copy and apply of settings

Postby laurencegibson » Mon Sep 10, 2018 6:08 pm

Handy little script for selectively copying and applying settings, for instance all of the Exposure settings bar Exposure itself. Hope its handy for others:
Code: Select all
global vAdjust


getAdjustments()
setAdjustments(vAdjust)

on setAdjustments(vAdjust)
   
   tell application "Capture One 11"
      
      set theVariants to selected variants
      tell current document
         
         repeat with |counter| from 1 to count of theVariants
            set theVariant to item |counter| of theVariants
            tell adjustments of theVariant
               set contrast to item 2 of vAdjust
               set brightness to item 3 of vAdjust
               set saturation to item 4 of vAdjust
            end tell
         end repeat
      end tell
   end tell
   
end setAdjustments


on getAdjustments()
   tell application "Capture One 11"
      
      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
            end repeat
         end if
         set thisVariant to item 1 of selectedVariants
         tell adjustments of thisVariant
            set vAdjust to get {exposure, contrast, brightness, saturation}
         end tell
      end tell
   end tell
   
   
   
end getAdjustments
laurencegibson
 
Posts: 2
Joined: Fri Jun 06, 2014 4:35 pm

Re: Selective copy and apply of settings

Postby ben_US » Tue Sep 18, 2018 2:15 pm

A heads up- it is possible to have more than one document; under Preferences > General, the option to allow more than one is "Open in New Window" (towards the top). Current Document will point to the frontmost.
Please make a support case for Technical Support with Capture One software:
http://support.phaseone.com and click on Contact Support, then select Technical Support.
ben_US
Crew
Crew
 
Posts: 602
Joined: Mon Feb 01, 2016 9:51 pm
Location: New York, USA

Re: Selective copy and apply of settings

Postby laurencegibson » Sun Sep 23, 2018 3:29 pm

Cheers Ben, thanks for heads up. I'm aware of this but often only have 1 doc open at a time. Are you thinking of using something like this instead of current document?

Code: Select all
   tell document 1 -- as far as I can tell there is only ever 1 document
laurencegibson
 
Posts: 2
Joined: Fri Jun 06, 2014 4:35 pm


Return to Scripting



Who is online

Users browsing this forum: No registered users and 2 guests