How to active Layer Style?

How to active Layer Style and set some property?

I don't know of any way to turn Layer Styles on directly. You could use the menu command:
  var myLayer = app.project.activeItem.selectedLayers[0];
  app.executeCommand(app.findMenuCommandId("Drop Shadow"));
  myLayer.layerStyle.dropShadow.distance.setValue(10);
This assumes that the comp has focus and the layer is selected though. You can force these conditions if you have CS6 (see the Viewer object in the CS6 Scripting Guide).
Dan

Similar Messages

  • How to apply Layer Styles?

    I'd like to apply do an "Add Layer Style"/"Stroke" on the active document layer. I can't find any more documentation on how to do this than:
    applyStyle (styleName)
    string Applies the specified style to the
    layer.
    Note: You must use a style from
    the Styles list in the Layer
    Style dialog.
    What would the styleName string be for a stroke? How would I specify color, size, and "position"?
    Frankly, I'm not even sure this is the right command... Thanks.

    Hello fellow members,
    I am a beginner on photoshop and was after a specific action. I want to create a photo that has been taken in colour, convert it to black and white, but have one specific item in the picture in colour eg a bunch of flowers or lips or eyes. I have been told it is something to do with layers, but this is not helpful to me. Can anyone help with some (simple) instructions as to how I can acheive this.
    Thanks, anita

  • PSE7, xp, how to load layer styles? no .db3 file found

    I have read all kinds of information about how to load custom layer styles and I've come to the conclusion that I need to install all styles into the folder where the other styles live (presets>styles) and I need an .xml file for each style to see the style in elements program and I need to delete the original .db3 file and let elements rebuild it when it opens but I cannot find an original .db3 file...anywhere.  Nor do I have any existing .xml files that coordinate with the original layer styles to manipulate for the new layer styles.  What am I missing?

    Hi,
    You would have to follow these steps -
    Hi,
    These steps would help you get them back.
    1 - Quit Elements
    2 - Go to the path - C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\6.0\Locale\en_US (for XP)
    { or Vista - C:\ ProgramData\ Adobe\ Photoshop Elements\ 6.0\ Locale\ en_US\ }
    (If you aren't in the US, use the appropriate Locale)
    Note that the "Application Data" is a hidden directory, so you will have to enable "Show hidden files and folders" in the Folder Options in order to be able to see it.
    3 - You should see a file named MediaDatabase.db3. Rename the file to something else, such as MediaDatabase.old
    4 - Restart the Elements Editor. You will see it rebuilding the database. Do not touch anything. It will take a while to rebuild. After thats done all things should be back to normal.
    Hope you're able to find the files and it works for you.

  • How can I merge layers with multiple layer styles added to them?

    So I have this issue where I have to merge lots of layers in order to finish the job. Thing is that two of them have layer styles added to them. Each one has two different layers styles added to it. If I try to merge the layers, the effect won't stay the same and only one layer style will apply (and not even this one works correctly). Is there any cure for this? Thank you!

    Here is how it looks before I merge the layers.
    And here is how it looks after I merge the layers.
    Why won't it stay the same?

  • How to load custom photoshop cs5 layer styles to photoshop cs6 ?

    how to load custom photoshop cs5 layer styles to photoshop cs6 ?

    yes that was done on installatiion , when i open ps cs6 and look for them there, and they are not there .  and thank for reponding so fast.

  • PSE 6 layer styles - how can I load new styles?

    PSE 6 layer styles - how can I load new styles?

    Hi,
    You need to download styles and then paste them to C:\ProgramData\Adobe\Photoshop Elements\8.0\Photo Creations\layer styles.
    You need to have a
    1) .asl file
    2) metadata.xml file.
    Relaunch  the application after this. the styles would be visible.
    In case you dont see them just go to C:\ProgramData\Adobe\Photoshop Elements\8.0\Locale\en_us and delete "MediaDatabase.db3" file.
    For XP:
    Copy the styles to C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\8.0\Photo Creations\layer styles
    and delete the "MediaDatabase.db3" file. at C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\8.0\Locale\en_US.
    For MAC :
    /Volumes/OS<name of Disk>/Library/Application Support/Adobe/Photoshop Elements/8.0/Photo Creations/Layer styles.
    and delete the "MediaDatabase.db3" file. at   /Volumes/OS<name of Disk>/Library/Application Support/Adobe/Photoshop Elements/8.0/Locale/en_US
    Hope this helps.

  • Mimic Photoshop's Bevel & Emboss layer style in Illustrator - how?

    Having searched for topics akin to my question, I have only really found tips on how to achieve a bevel and emboss on type.
    Here's what I'm trying to create... all using CS4...
    I have an artwork, all in Illustrator so far. It has background images of people (as cut-outs), imported from Photoshop, with layer masks, saved as PSD's, to preserve transparency around the figures, which allows me to compose them over each other and other various component graphics, resident in the Illustrator document. This helps me keep all the graphical elements fully editable in the design/layout as only the people come from Photoshop.
    The design has been finalised with the addition of a bevel and emboss layer effect, to the whole bounding box area of the design. I.e. the complete 900 x 700 pixel area is affected by the bevel and emboss - all the various underlying pixels of photoshop elements and Illustrator elements.
    So far, I have only been able to achieve this by taking the whole thing back into Photoshop, as a single layer and then applying the Bevel&Emboss layer style effect!
    Is there a way to keep this all in Illustrator?
    It seems daft to have to go back into Photoshop just for the B&E effect... and a little dangerous, in case this step gets overlooked in the future!
    My current thoughts involve a couple of shaped blends with a screen and multiply overlay setting for the light and shaded edges... but this is just my mind clicking!
    Would love to know if this can be achieved in Illy.

    Out of curiosity... and to better understand what Illustrator can do, I'd like to try both of your methods.
    However, I'm a little lost with your explanation of the second method...
    Can you expand on giving the "L" shaped path (that has been outlined): two fills?
    Or the rectangle that has been outlined: four fills?
    How do you give a shape more than one fill, gradient or otherwise?
    And how do you deal with the light and dark intersections of the two grad styles (as appears in the bottom left and top right corners), did the 45° meeting point just happen or do you have to alter the geometry?
    Any chance I could have the .ai file to pull apart?
    Another method I found myself, after some experimenting is as follows...
    Dotted white line = page/design bounds.
    Give 'Shape A' a white drop shadow (Effect > Stylise > Drop shadow) with a "screen" mode and positive values for X and Y offset. This gives a light shadow below and to the right.
    Make 'Shape B' a Clipping Mask for 'Shape A' - this leaves nothing but the drop shadow showing.
    Give 'Shape D' a black drop shadow (Effect > Stylise > Drop shadow) with a "multiply" mode and negative values for X and Y offset. This gives a dark shadow above and to the left.
    Make 'Shape C' a Clipping Mask for 'Shape D' - this leaves nothing but the drop shadow showing.
    Here's the result...
    Put the new geometry (light and dark bevel shapes) on a layer at the top and, hey presto, they'll influence anything on levels below.
    Only downside of this method is that the drop shadows can take a while to render, each time they are adjusted, so it's worth turning them off (or hiding their layer) while working on other areas of the design.
    Also, with all of these methods, you don't get quite the same intersections at the bottom left and top right corners, as you do with the bevel and emboss layer style/effect in Photoshop... but that's being really picky!
    Thanks for helping with this and hope it helps others.
    Still want to work through your methods though.

  • How to get active layer comp

    Is there a way of getting the active layer comp?
    I have a script that applies a series of layer comps saving different versions of the file in between, however it seems that on a very fast machine it the script tries to move onto saving before the layer comp is fully applied, so I would like to check which layer comp is applied and only let the script continue when the value changes from the last layer comp.

    Here is an example that get the current tool.
    function getCurrentTool()}
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
       return = typeIDToStringID(executeActionGet(ref).getEnumerationType(stringIDToTypeID('tool')));
    But for executeActionGet to work you need to create an Action Reference to the class or property you want to get the Action Descriptor for. Here is the scriptlistener log for apply layerComp.
    var idapplyComp = stringIDToTypeID( "applyComp" );
        var desc37 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref36 = new ActionReference();
            var idcompsClass = stringIDToTypeID( "compsClass" );
            ref36.putName( idcompsClass, "Layer Comp 1" );
        desc37.putReference( idnull, ref36 );
    executeAction( idapplyComp, desc37, DialogModes.NO );
    It has been my experence that when null is used in the reference you can not access that class with Action Manager.

  • How do I create layer styles in CS3 to use in elements?

    Hi,
    sorry if this is a very broad question, I am new to CS3. I usually use elements.
    I really want to create lots of different layer styles that I can save and use in Elements.
    Can someone tell me, or direct me to a good tutorial for making new layer styles in photoshop.
    Also is it easy to save the new style so I can load to elements?
    I appreciate any help with my question,
    Thanks so much!!

    This is not the "PSE" forum.
    You want the Ps Elements forum across the hall:
    http://forums.adobe.com/community/photoshop_elements

  • How about setting default layer styles to 90 degrees by default?

    Who ever really uses 120 degrees for anything? If I could count the number of times I've had to change my layer styles to 90 or 180 from the junky 120, I'd reach a number which doesn't exist because it's so damn big.
    Fix this, or give users an option to set a default and designers will LOVE YOU.

    There's also the "Make Default" button at the bottom of the Layer Styles dialogue box if you tend to use certain settings often.

  • How to stop history from switching active layer?

    Hi all.
    This thing has bugged the hell out of me for years and years, I've always just coped with it, but I would really love a fix. I also noticed this is a problem a lot of other people have too.
    When ever I'm painting etc. I like to have a fair amount of layers. It's nice to have the characters on a different layer than the backgroud for instance. But then at some point, as I'm painting the character, I notice that a quick ⌥ ⌘ Z I pressed a while ago has tranferred me to the background layer.
    Please don't just tell me to live with it. I have been trying to adjust to it for ages, and it's still easily the biggest problem I have ever had with Photoshop. I've tried to start painting on a new layer by drawing a small scribble and erasing it and what not, but then sometimes I forget. Sometimes it's ok, but sometimes this ends up ruining my whole layer hierarchy (I have to collapse the whole thing or separate the character from the background all over again, which kind of ruins layers in general for me). Can't I just have a "stop this irritating thing from happening-tick" in the preferences?
    I mostly work on CS5 with a mac at work, but I have a PC and CS4 at home with the same problem. I love Photoshop, and I'm not a coder, but is it really so hard to stop history from screwing with what layer I'm on? I know this might seem like a rant, and I guess it kind of is, but please please PLEASE help me fix this! Also, sorry if this has been discussed before, I'm sure it has actually, but I couldn't find it with a quick search.

    It has come up before …
    http://forums.adobe.com/search.jspa?resultTypes=DOCUMENT&resultTypes=MESSAGE&resultTypes=C OMMUNITY&resultTypes=TASK&resultTypes=PROJECT&resultTypes=SOCIAL_GROUP&resultTypes=COMMENT &peopleEnabled=true&q=undo+active+layer
    I couldn’t locate the pertinent feature request at
    http://feedback.photoshop.com/photoshop_family/products/photoshop_family_photoshop
    so you might look some more there or just start an new one.

  • How to cycle thru blend modes within the Layer Style dialog??

    Hopefully, we all know you can use the Shift key and + or - to cycle through blend modes in the layers panel, as well as in various tools (like the Gradient tool or the Brush tool). A great way to quickly preview your blending options.
    But what about within the Layer Style dialog? This seems to the only situation where this shortcut does not work. Is there another shortcut or workaround that can be used here?
    I'm using Photoshop CS2 (on a Mac).
    Thanks,
    Doug D.

    That's a good point.
    I guess that Multiply (for Shadow) and Screen (for Glow) are really the "go to" blends for these effects, and including any other options beyond those is all just gravy.
    I'm just so addicted to using the Shift +/- shortcut and really like previewing blending changes that way... (But it would create a conflict within Bevel and Emboss, as you suggest.)

  • Unify Layer Style - cannot find the tools

    Unify Layer Style - I have found the section in Adobe Help PDF, but for the life of me, I cannot find the tools within PS6 .... These are the instructions:
    Unify layer properties
    1.In the Animation panel (Photoshop Extended CS5) or Timeline panel (CS6), change the attribute to one frame.
    2.In the Layers panel, click Unify Layer Position , Unify Layer Visibility , or Unify Layer Style  to have the changed attribute apply to all other frames in the active layer.
    I have multiple photographs I would like to create a video of. I want the fade affect to be applied to each picture, but so far I have only been able to update the fade on each idividual frame. I have searched and searched all over google and cannot find specific instructions of how to duplicate the fade affect to all my frames.
    I have Photoshop CS6
    Please help

    There in the top section of the layer palette when you in a frame animation in the timeline palette. Note the options they can be hidden...............
    Unifying layer properties in animation frames
    The unify buttons (Unify Layer Position, Unify Layer Visibility, and Unify Layer Style) in the Layers panel determine how the changes you make to attributes in the active animation frame apply to the other frames in the same layer. When a unify button is selected, that attribute is changed in all the frames in the active layer; when that button is deselected, changes apply to only the active frame.
    The Propagate Frame 1 option in the Layers panel also determines how the changes you make to attributes in the first frame will apply to the other frames in the same layer. When it is selected, you can change an attribute in the first frame, and all subsequent frames in the active layer will change in relation to the first frame (and preserve the animation you have already created).
    Unify layer properties
    In the Animation panel (Photoshop Extended CS5) or Timeline panel (CS6), change the attribute to one frame.
    In the Layers panel, click Unify Layer Position , Unify Layer Visibility , or Unify Layer Style to have the changed attribute apply to all other frames in the active layer.
    Propagate frame 1
    In the Layers panel, select the Propagate Frame 1 option.
    In the Animation panel (Photoshop Extended CS5) or Timeline panel (CS6), change the attribute for the first frame.The changed attribute is applied (in relation) to all subsequent frames in a layer.
    You can also propagate frames by Shift-selecting any consecutive group of frames in the layer and changing an attribute in any of the selected frames. 
    Show or hide Unify Layers buttons
    Choose Animation Options from the Layers panel menu, and then choose one of the following:
    Automatic Displays the unify layers buttons when the Animation panel is open. In Photoshop Extended, the Animation panel must be in frame animation mode.
    Always Show Displays the unify layers buttons whether the Animation panel is open or closed.
    Always Hide Hides the unify layers buttons whether the Animation panel is open or closed.

  • Installing new layer styles in PSE 7

    What is the correct way to install new layer styles into pse 7? ( I use Vista)
    Do I move my extracted style file into the layer styles folder by following this pathway: program data>adobe>photoshop elements>7.0>photo creations>layer styles.
    Do I need to create a metafile too?
    Thank you for helping me, I have about a dozen styles I need to add, but I am unsure how to get it done properly.

    Hello,
    You need to create a metadata.xml file too to view it in a specific category of your choioce.
    You need to paste the two things :
    1) .asl file.
    2) metadata.xml,
    to the following location:
    C:\ProgramData\Adobe\Photoshop Elements\8.0\Photo Creations\layer styles.
    Here you need to add the two files and relaunch PSE. This will show you the presets in the layer styles category with.
    While creating the metadat.xml file you need to take care of two things:
    1) Add a new category name so that you can easily find them.
    2) You need to verify that Type value is set "Style  as mentioned :  <type value="style" />
    Hope this helps you.

  • Get layer style parameters?

    How is it possible to set and get layer style parameters? For example read out stroke size, shadow distance, etc...

    In case you're still interested about getting and setting layer styles parameters, I've just released a new module jamStyles of my open-source JSON Action Manager scripting library, which provides full support for blending options and layer effects using a fully-documented, simplified JSON object format.
    I've also written a quick tutorial showing how to perform a few standard operations, using mainly the two functions jamStyles.getLayerStyle and jamStyles.setLayerStyle.
    For instance, the following code sample will set a mildly complex layer style:
    var layerStyleObj =
        "blendOptions":
            "fillOpacity": 70,
            "blendInterior": true
        "layerEffects":
            "scale": 100,
            "dropShadow":
                "enabled": true,
                "mode": "multiply",
                "color":
                    "red": 0,
                    "green": 0,
                    "blue": 0
                "opacity": 70,
                "useGlobalAngle": false,
                "localLightingAngle": 90,
                "distance": 6,
                "chokeMatte": 0,
                "blur": 4,
                "noise": 0,
                "antiAlias": false,
                "transparencyShape":
                    "name": "Linear",
                    "curve":
                            "horizontal": 0,
                            "vertical": 0
                            "horizontal": 255,
                            "vertical": 255
                "layerConceals": true
            "innerShadow":
                "enabled": true,
                "mode": "multiply",
                "color":
                    "red": 0,
                    "green": 0,
                    "blue": 0
                "opacity": 70,
                "useGlobalAngle": false,
                "localLightingAngle": 90,
                "distance": 10,
                "chokeMatte": 15,
                "blur": 20,
                "noise": 0,
                "antiAlias": false,
                "transparencyShape":
                    "name": "Linear",
                    "curve":
                            "horizontal": 0,
                            "vertical": 0
                            "horizontal": 255,
                            "vertical": 255
            "innerGlow":
                "enabled": true,
                "mode": "linearDodge",
                "color":
                    "red": 255,
                    "green": 246,
                    "blue": 168
                "opacity": 31,
                "glowTechnique": "preciseMatte",
                "chokeMatte": 0,
                "blur": 20,
                "shadingNoise": 0,
                "noise": 0,
                "antiAlias": true,
                "innerGlowSource": "centerGlow",
                "transparencyShape":
                    "name": "Half Round",
                    "curve":
                            "horizontal": 0,
                            "vertical": 0
                            "horizontal": 29,
                            "vertical": 71
                            "horizontal": 87,
                            "vertical": 167
                            "horizontal": 195,
                            "vertical": 240
                            "horizontal": 255,
                            "vertical": 255
                "inputRange": 43
            "bevelEmboss":
                "enabled": true,
                "highlightMode": "screen",
                "highlightColor":
                    "red": 255,
                    "green": 255,
                    "blue": 255
                "highlightOpacity": 100,
                "shadowMode": "multiply",
                "shadowColor":
                    "red": 0,
                    "green": 0,
                    "blue": 0
                "shadowOpacity": 100,
                "bevelTechnique": "softMatte",
                "bevelStyle": "innerBevel",
                "useGlobalAngle": false,
                "localLightingAngle": 90,
                "localLightingAltitude": 75,
                "strengthRatio": 80,
                "blur": 16,
                "bevelDirection": "stampIn",
                "transparencyShape":
                    "name": "Linear",
                    "curve":
                            "horizontal": 0,
                            "vertical": 0
                            "horizontal": 255,
                            "vertical": 255
                "antialiasGloss": false,
                "softness": 0,
                "useShape": true,
                "mappingShape":
                    "name": "Half Round",
                    "curve":
                            "horizontal": 0,
                            "vertical": 0
                            "horizontal": 29,
                            "vertical": 71
                            "horizontal": 87,
                            "vertical": 167
                            "horizontal": 195,
                            "vertical": 240
                            "horizontal": 255,
                            "vertical": 255
                "antiAlias": true,
                "inputRange": 70,
                "useTexture": false
            "solidFill":
                "enabled": true,
                "mode": "normal",
                "opacity": 100,
                "color":
                    "red": 0,
                    "green": 102,
                    "blue": 255
    jamStyles.setLayerStyle (layerStyleObj);
    And this code will let you read out the drop shadow distance:
    var layerStyleObj = jamStyles.getLayerStyle ();
    if (layerStyleObj)
        if ("layerEffects" in layerStyleObj)
            var layerEffectsObj = layerStyleObj["layerEffects"];
            if ("dropShadow" in layerEffectsObj)
                var dropShadowObj = layerEffectsObj["dropShadow"];
                alert ("Drop shadow distance: " + dropShadowObj["distance"]);
    Actually, if you know for sure that the current layer you're working on has layer effects, including a drop shadow effect, the code can be as short as:
    var layerStyleObj = jamStyles.getLayerStyle ();
    alert ("Drop shadow distance: " + layerStyleObj["layerEffects"]["dropShadow"]["distance"]);
    Or, even shorter, using dot notation:
    alert ("Drop shadow distance: " + jamStyles.getLayerStyle ().layerEffects.dropShadow.distance);
    HTH,
         --Mikaeru

Maybe you are looking for