Applying style to layer
tell application "Capture One 20"
repeat with thisVariant in (get selected variants)
set theNewLayer to make new layer of thisVariant with properties ¬
{opacity:50}
tell theNewLayer to apply style "Test"
end repeat
end tell
this is the error I am getting:
error "Capture One 20 got an error: Can’t make "Test" into type layer." number -1700 from "Test" to layer
Thanks
-
The property apply style refers to applying a style on next capture or import options.
It looks like it can take a layer name to apply the style to but I dont have a camera on my to test.
The styles property seems to belong to the Variant class so, atleast viable applescript and to the best of my knowledge, can only be applied to the background layer.
Even if you specifically tell the variant to apply a style to a layer it will just apply it to the background layer. as you can see with the below.tell application "Capture One 20"
repeat with thisVariant in (get variants whose selected is true)
set theNewLayer to make new layer of thisVariant with properties ¬
{opacity:50, name:"rick"}
tell theNewLayer to fill mask
tell theNewLayer to set styles of item 1 of thisVariant to "ricka"
end repeat
end tell
I would have thought that something like the below would work but I cant seem to get to run.tell theNewLayer to set styles of layer "rick" of item 1 of thisVariant to "ricka"
or
set styles of layer "rick" of item 1 of thisVariant to "ricka" --ricka being the style I'm trying to apply0 -
Thanks I got it to work.
instead oftell theNewLayer to apply style "Test"
I got it to work withapply style theNewLayer named "Test"
0 -
Hey guys! hope you can help :) I've been really going round in circles trying to get this working. I would really appreciate if you could copy and paste the entire working script here. you seem to have got the closest to what I'm trying to achieve. basically I want to apply a style I have saved to a new adjustments layer and not to the background layer. thanks in advance.
0
Please sign in to leave a comment.
Comments
3 comments