Better copy of adjustements
I have started to play with Applescript and it seem very useful.
I have created better version of copy/paste adjustment function.
This script copies adjustments of selected variant with focus (primary variant) to other selected variants. It lets you choose whether copy also crop. Before paste it resets variant to prevent layer duplication. After adjustments paste it set last (top most) layer as active, set crop and moves focus to next variant in selection.
EDIT 6.10.22: I have added also copy of lens correction, flip and rotation together with crop
Any comments appreciated.
--
-- Created by: Zdenek Macháček
-- Created on: 02.10.2022
--
-- Copyright © 2022 Zdenek Macháček, All Rights Reserved
--
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
-- BETTER ADJUSTEMENT COPY
-- copies adjustements from the first selected variants to rest of selected variants
-- you can choose if copy also crop, rotation, flip and lens correction ant
-- before copying resets each variant, after copy set last layer of variant as active and move focus on next variant in selection
tell application "Capture One 22"
set tmpVar to primary variant
set selVarCount to count of selected variants
set selVarList to selected variants
-- check if more variants are selected
if selVarCount > 1 then
set cropYN to display dialog "Copy with CROP?" with icon note buttons {"YES", "NO"} default button "YES"
-- copy adjustements of selected photo to clipboard
copy adjustments tmpVar
-- repeat for all phjotos in selection
repeat with v from 1 to selVarCount
set workingVariant to get (item v of selVarList)
if workingVariant ≠ tmpVar then
if button returned of cropYN = "NO" then
-- when not copying crop, then store crop of working variant
set tmpCrop to crop of workingVariant
-- store also lens correction
set tmpLensCor to lens correction of workingVariant
-- store flip and rotation
tell workingVariant
set tmpFlip to flip of adjustments
set tmpRotation to rotation of adjustments
end tell
end if
-- reset adjustements of working variant (for not duplicationg layers if there are some)
reset adjustments workingVariant
-- paste adjustements of source variant
apply adjustments workingVariant
-- set the last layer as active
tell workingVariant
set current layer to last layer
-- if crop is copyed, then set crop, lens correstion, rotation and flip based on source variant else based on stored original crop
if button returned of cropYN = "YES" then
set lens correction to lens correction of tmpVar
set flip of adjustments to flip of adjustments of tmpVar
set rotation of adjustments to rotation of adjustments of tmpVar
-- crop schould be after rotation to work correctly
set crop to crop of tmpVar
else
set lens correction to tmpLensCor
set flip of adjustments to tmpFlip
set rotation of adjustments to tmpRotation
-- crop schould be after rotation to work correctly
set crop to tmpCrop
end if
end tell
end if
end repeat
-- move to the next variant in selection
change selection current document to next variant
end if
end tell
-
This is great
Goes a long way to improving the copy/paste command
Would you know how to link the other composition adjustments to the crop Y/N toggle?
e.g. If I don't want the crop I probably also don't want the geometry adjustments.
Thanks for the script in any case
Joe
0 -
Hi, it is possible to store/set lens correction parameters (lens correction property of variant) and also rotation and flip (part of the adjustments of the variant). I have didn't found data about keystone parameters in object model so far.
So it is not difficult to change the script. Are you able to change it by yourself or do you need help?
0 -
Currently I'm not able to do applescript by myself as my current knowledge level is just copy/paste.
But I could start to learn...
0 -
I have updated script to work also with rotation, flip and lens corrections. Keystone settings are unfortunately unavailable in object model. Hope it helps.
If you want to start with Applescript you can start with this video https://youtu.be/VUbud-Uh3h0
0 -
Thanks so much! I'll dive into the video too.
So, there is no way to leverage the option in the adjustments clipboard:
Autoselect> Adjusted/Adjusted except composition
?
0 -
No. Or nothing I am aware of. Copy adjustment command has only one parameter - variant from which you copy the adjustments
0
Please sign in to leave a comment.
Comments
6 comments