Layer Structure for Selected Pictures + Disable a Layer
Hi there,
I have found a script on this forum and adapted to my needs.
There are 2 things that I am not able to achieve and I would love your help.
- I would like to disable a layer AFTER apply a style to it (if I disable it with enable:false while creating it, the style won't be applied and the script stops running)
- At the moment I can apply the script to individual pictures. I would like to run it to all selected pictures.
Here is the script:
tell application "Capture One 22"
tell layers of primary variant
-- create layer structure
set expLayer to make new layer with properties {name:"Exposure", kind:adjustment} at end
set claLayer to make new layer with properties {name:"Clarity", kind:adjustment} at end
set colbalLayer to make new layer with properties {name:"Color Balance", kind:adjustment} at end
apply style colbalLayer named "BW Correction"
set gradeLayer to make new layer with properties {name:"Color Grade", kind:adjustment} at end
set postprocLayer to make new layer with properties {name:"Post Process", kind:adjustment} at end
apply style postprocLayer named "Soft S Curve"
apply style postprocLayer named "Film Grain"
set sharpLayer to make new layer with properties {name:"Sharpness", kind:adjustment} at end
apply style sharpLayer named "Sharpness"
set vignLayer to make new layer with properties {name:"Vignette", kind:adjustment, opacity:30} at end
apply style postprocLayer named "Vignette"
tell expLayer
fill mask
end tell
tell claLayer
fill mask
end tell
tell colbalLayer
fill mask
end tell
tell gradeLayer
fill mask
end tell
tell postprocLayer
fill mask
end tell
tell sharpLayer
fill mask
end tell
tell vignLayer
fill mask
end tell
end tell
end tell
-
You can loop through selected images using this:
repeat with theVariant in (variants whose selected is true)
for disabling layers use this:
set enabled of LayerName to false
0 -
Thanks! It finally works :D
0 -
Mmh 2 new questions!
First one: Is there a way to select as the active layer the first one created?By default the last layer created is the one selected. But in my workflow I start by editing the first layer, so everytime I select the next picture, I have to manually click the first layer created.
Second question:
I want to select multiple images and disable / able a layer for all of them, but it says I have to define the layer first.I used the same code as before (tell capture one / repeat with the variant) and then added this code:
set enabled of LayerName to true
How to I define a layer?
0 -
I am not sure if there is a select layer option with scripting, you can always use the scripting dictionary to see what is available and what is not: https://support.captureone.com/hc/en-us/articles/360002681418-Scripting-for-Capture-One
0
Please sign in to leave a comment.
Comments
4 comments