Group layer feather mask

I am writing a script that iterates through the layers of a document and apply a feather mask if there is not already one.

var iterGroup = {function (group)}

for (i = 0; i < group.layerSets.length; i ++) {}

iterGroup (group.layerSets [i]);

};

for (i = 0; i < group.artLayers.length; i ++) {}

If (group.artLayers [i] .layerMaskFeather == 0) {}

Try the clause because the script hangs on layers that have no mask.

try {}

group.artLayers [i] .layerMaskFeather = 0.5;

} catch (err) {}

};

};

};

};

iterGroup (app.activeDocument);

It does what it is supposed to to do, sort of, but it only works on layers of art.  The frustration I have is that we use a lot of masks on layers of the Group and for some reason any that adobe has chosen to put the property layerMaskFeather in the class artLayer rather than its parent class, the layer.  The layerset class seems to have no property layerMaskFeather DOM access, even if it is available from the GUI.  I could also select each layer in turn and perform an action on it, but I still need to try the pen of mask to see if the user already has a custom setting.  Is it possible that I can do this?

Thank you

-Tim

This will do a full psd.

#target photoshop;
if(documents.length) userMaskFeatherIfZero();
function userMaskFeatherIfZero(){
   var ref = new ActionReference();
   ref.putProperty( charIDToTypeID( "Prpr" ), charIDToTypeID( 'NmbL' ));
   ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
   var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
try{
    activeDocument.backgroundLayer;
var i = 0; }catch(e){ var i = 1; };
   for(i;i 
         

Tags: Photoshop

Similar Questions

  • Layer for mask automatically generated when I create an adjustment layer

    Hi all how to do a layer of mask to get generated automatically when I create an adjustment layer. I took a course and it say by default that's the case? Thanks for any help

    A mask is the default value. Make sure that this box is checked in the settings panel

  • Y at - it a shortcut to auto select group/layer?

    I really use this feature all the time and it's nerve cracking up every time the options bar, and then select group/layer.

    Help, please. It will be a life saver.

    Thanks in advance.

    After selecting the layer as above, release the ALT key and press the ctrl key to simply move the selected layer.

  • How to make a clipping of a group in a mask layer?

    I want that a group layers on a lowerlayer clipping mask.

    A workaround might be to convert the group to a smart object and Clipping mask layer below.

    Just to make sure that could you please post a screenshot with the Panel visible layers?

  • Grouping and clipping masks

    I just created a merry-go-round.  I create each animal separately and then combining them.  By far the most complex animal is the Zebra.  I created the strips by drawing lines that go outside the Zebra adjusing using the widths and - thanks to the wonderful of the forum, created a form of Zebra clipping mask.  Very well.  Now I would like al to group items so I can treat the Zebra as one object among others.  First of all, I'm doing the clipping mask group and scratches.  All well and good so far.

    before grouping, but stripes and clipping mask are grouped.JPG

    But then, when I bring together all the elements, the effect of cut goes, and the stripes extend beyond the Zebra.  I see that the clipping mask is always there, but the effect of the clipping mask disappeared.

    zebra after grouping.JPG

    Not very good.

    (Note: the same thing happens if I I do not first a group of the clipping mask and the scratches .)

    Frustrated (72 years) old-dog fearing that it becomes too too old to learn all the new stuff.

    There are two types of clipping masks. Object, it automatically creates a group. The second is a mask of base layer. This is not a group, but rather of all the objects on a given layer clips.

    That the second is the type that you created. But it cannot be contained within another group.

    What you need to do is create a based clipping mask object instead (don't worry, you can use the same objects that you already own. You must use the command object > clipping mask > make instead of the button in the layer panel.

  • Opacity of layer/density mask

    I just update Photoshop CC and may not know how to change the opacity or the density of the layer mask after I create the mask. I used to create the mask layer 100%, and then change the density in the properties of the layer mask Panel. This option is no longer available... at least as far as I can see. Any suggestions? Thank you.

    Select the layer mask, then go to the window-> properties

  • Layer of mask works not not in PS CC 2015.2, when the mask is selected and that you paint on the mask he erases the photo thanking hide. I have reset my preferences and my brush tool. Don't know what to do next.

    So, I hope someone can help me solve this problem. I didn't have a problem before the last update. It is composed of my workflow because I use a lot of masking.

    Thank you

    I think you have confused yourself Marcia HERE with a non-existent problem. You say that 'you have enabled other layers off when I saw that in the image the part hidden image showed always the part of the image, I've hidden". It would be nice if the lower layer is exactly the same as the masked layer? You talk as if you know what you're doing, but just in case:

    Terri

  • Same layer - several masks.

    Sorry... basic question.

    How should multiple masks on the same layer?

    for example. 3 frames of windows in a single image (layer), each requiring an "insert" (a layer).

    1. Select your layer
    2. Select the tool pen (letter g)
    3. Draw the first mask
    4. The first mask to subtract the value
    5. Draw the second mask
    6. The second mask to subtract the value
    7. Repeat if necessary

    Another option

    1. Add a solid color to your model above the layer you want to hide
    2. Change the blending mode of the layer to multiply or overlay color so you can see through it
    3. Select the layer of color that you can now see through
    4. Select the pen tool or another tool to mask
    5. Draw your masks with the underlying layer as a guide
    6. Define the layer of color as a cache alpha reversed by approach for the layer you want to hide

    To learn how to use mask in detail of type mask tools in the search help field at the top right of EI and follow the links for instructions and the excellent tutorials.

  • Toggle visibility for the Group layer

    With the help of this forum, I got a script that activates / deactivates the visibility of a specific layer without selecting the layer.

    I would like to know if the same functionality can be obtained for a layer group.

    In other words the script can toggle the visibility of a layer with output actually group by selecting the Group of layers?

    I understand that some parts of Photoshop are not scriptable and wan to ensure that it is not one of them, before I was embarking on the creation of the script.

    
    

    I have a script that does what you need. Can't remember if I got here, but I know that the scripts here guys are geniuses and can help you with almost anything. That being said, here's the script you need. All you need to do is replace the three parties "Insert Layer Name Here" with the name of the layer you want to toggle. Don't thank me, thank the guy who wrote (probably someone here)

    var targetID = getLayerIDByName('Insert Layer Name here');
    if(undefined != targetID){
        if(getLayerVisibilityByID( targetID ) ){
            hideByName('Insert Layer Name here');
        }else{
            showByName('Insert Layer Name here');
        }
    }
    function getLayerIDByName(name) {
        try{
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "LyrI" ));
        ref.putName( charIDToTypeID( "Lyr " ), name );
        return executeActionGet(ref).getInteger(charIDToTypeID( "LyrI" ));
        }catch(e){}
    };
    function getLayerVisibilityByID( id ) {
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "Vsbl" ));
        ref.putIdentifier( charIDToTypeID( "Lyr " ), id );
        return executeActionGet(ref).getBoolean(charIDToTypeID( "Vsbl" ));
    };
    function hideByName(name) {
        var desc = new ActionDescriptor();
            var list = new ActionList();
                var ref = new ActionReference();
                ref.putName( charIDToTypeID('Lyr '), name );
            list.putReference( ref );
        desc.putList( charIDToTypeID('null'), list );
        executeAction( charIDToTypeID('Hd  '), desc, DialogModes.NO );
    };
    function showByName(name) {
        var desc = new ActionDescriptor();
            var list = new ActionList();
                var ref = new ActionReference();
                ref.putName( charIDToTypeID('Lyr '), name );
            list.putReference( ref );
        desc.putList( charIDToTypeID('null'), list );
        executeAction( charIDToTypeID('Shw '), desc, DialogModes.NO );
    };
    

    EDIT-Oops, I just realized that it is only for layers, not groups. But I hope that it is a starting point

  • Issues group layer

    I have problems with Photoshop CC. Every time I try to catch a layer in a layer set, I always get the whole group. I'm unable to grasp the different layers. I thought it was the fault of my Wacom pen but I reinstalled the latest driver, but it still doesn't let me select and move individual layers. I use the latest version of Photoshop CC. Any help greatly needed and appreciated. Layer

    Check the settings you use in the move tool. Very probably, set it to auto groups.

  • How to use rotoscoped layer as mask or track matte

    I do some work between a 3d program and after effects cs6.

    Is it possible to use a layer of rotoscoped as a mask or a matte to another layer?

    Have you tried as luma cache without success.

    Should I precompose anything?

    Thanks for any help.

    Do not use a cache of Luma.  Use an Alpha Matte, or Alpha inverted Matte: the difference depends on what you want, you want to see and what you don't want to see, and it is simple to change.

  • PES 10 can't change read-only groups layer (aka I want to just make a custom in the elements DVD menu)

    A little history: I wanted to make a custom menu, so I opened a copy of one of the menu canned. In PS Elements 10 PSD files.  It opened with all the layers and their showing sublayers.  So far so good.  I made a lot of editting and had my menu pretty much right, recorded and burned a DVD with it.  I saw a few corrections that I need to do so I opened the same. PSD file and it showed all main layers (with the folder icon) but not the attached layers.

    I double-clicked to open these layers and got:

    "You try to open a group, which is not supported in Photoshop Elements.  The layers in this group will be simplified in a single layer.  Simplify the layers? Yes No. »

    I just change these things yesterday.  Everything I've done since then is save my software online. I saw that it said in this forum that "Elements doesn't support layer group/sets' but she was referring to an earlier version, I guess.

    Question 1: Is it always true PES 10?

    Whatanagement 2: if so, how me I edit the other day?

    Thanks in advance for any help you can offer.

    Joe

    #1: Yes.

    #2: I don't know.

    You need use a 3rd plugin to change layer groups.  See this discussion:

    http://forums.Adobe.com/message/3954579#3954579

    Ken

  • Feather mask

    I have a question on the fringes of the mask.

    If I want to hide something pen I have to click Edit value and type my amount.

    How to bring back the thing mask feather slide.

    I don't know how to explain it better...

    Right-click the timline column headers and bring back the "switches" and "has / V features" column...

    Mylenium

  • CS4: Cannot move a layer in a together group layer.

    I created a group of layers in Photoshop CS4. When I select a specific layer within this group to try to move it, I immediately get moved to the folder and the entire group moves - in other words, I can't move that only the specific layer (I have to bring him outside the group to move). I know that wasn't the case in the past and I was wondering what could be the problem. None of the layers are locked. Thanks for any help.

    You have your Move tool set incorrecty

    uitkuijk In your Options bar (at the top of the interface) uncheck the box 'Automatic Selection '. It is more likey causing the behavior you describe.

    For the most part, the work of the drop must also be on 'layer' and not 'group '.

  • Apply a layer of /mask (?) to multiple Images

    I don't know even where to start so I can explain what I need to do.

    I'm trying to take a person on an image and then put the person on 100 other images in the same place. I don't want to have to do that 100 times different, being the person will be placed on the 100 images in the exact spot even pictures, I'm thinkn I have to make a copy (or store) the cutting of the person as a bed somehow. So how do that 100 other images (Backgrounds) help! I've looked everywhere and I'm just not getting it...

    Here's how I do in PSE2. Later versions could have otherwise.

    1. open the image of the person you want to copy. Use the different selection tools to select him/herself.
    2. copy the person selected in the Clipboard: Edition > copy or Ctrl + C in the PC, command + C on the Mac.
    3. open one of the destination pictures and paste it from the Clipboard: Edition > paste or Ctrl + V into PC, command + V on the Mac. The person will be placed on a new layer with transparent background.
    4 use the tool moving to resize/reposition the person if necessary.  When resizing, hold the SHIFT key while dragging a corner handle (Maj retains the proportions).
    5. keep this open image and open the next destination image.
    6 select the first image and hold SHIFT then drag the layer of the person to the destination image. This copy of the layer and keeps the person in the same relative position (if you do not move the person will be positioned to where you drag the layer).
    7. Repeat this copy of layer for the remaining photos.

    I don't know a way to do it in the world all of a sudden. Again, your PSE version could have this capability.

    Tip: After selecting initially the person pen 1 2 px selection to soften the edges before copy you to Clipboard. Then the stuck person will look more natural and less 'stuck '. I have an example of this at http://forums.adobe.com/message/3346946#3346946, msg #2.

Maybe you are looking for