Skip to main content

⚠️ Please note that this topic or post has been archived. The information contained here may no longer be accurate or up-to-date. ⚠️

Applying style to layer

Comments

3 comments

  • Rick Allen
    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 apply
    0
  • NN110943UL
    Thanks I got it to work.
    instead of tell theNewLayer to apply style "Test"

    I got it to work with apply style theNewLayer named "Test"
    0
  • Kim Hardy

    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.