Add vector mask to artLayer [PS CS5 JS]

Is there a way to make it.
Looks like the artLayer object doesn't have any method to make this...

You need to use Action Manager code (as recorded by ScriptingListener.plugin).
// 2015, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
try {
// =======================================================
var idMk = charIDToTypeID( "Mk  " );
    var desc5 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref3 = new ActionReference();
        var idPath = charIDToTypeID( "Path" );
        ref3.putClass( idPath );
    desc5.putReference( idnull, ref3 );
    var idAt = charIDToTypeID( "At  " );
        var ref4 = new ActionReference();
        var idPath = charIDToTypeID( "Path" );
        var idPath = charIDToTypeID( "Path" );
        var idvectorMask = stringIDToTypeID( "vectorMask" );
        ref4.putEnumerated( idPath, idPath, idvectorMask );
    desc5.putReference( idAt, ref4 );
    var idUsng = charIDToTypeID( "Usng" );
        var ref5 = new ActionReference();
        var idPath = charIDToTypeID( "Path" );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref5.putEnumerated( idPath, idOrdn, idTrgt );
    desc5.putReference( idUsng, ref5 );
executeAction( idMk, desc5, DialogModes.NO );
} catch (e) {}

Similar Messages

  • [BUG]PS CC Layer Group add vector mask and disable it,use path selection tool click,always crash!!!

    [Bug] Photoshop CC,Layer Group add vector mask and disable it, use path selection tool click canvas, always crash!!!  Please help me!
    The sample psd file(158KB):
    http://doc.aoyea.com/ps_cc_bug.psd
    My Computer configuration:
    SONY VAIO CA100 Notebook、Intel Core I5 2410 CPU、16GB RAM、AMD Radeon 6600M(1G RAM)、Windows7 x64 SP1(clean)、Scratch disk free space is 100GB
    email: [email protected]

    Hi,
    As far as i know that's a bug that will hopefully be fixed in the next update to photoshop cc.

  • Add vector mask to smart filter

    You can apply a mask to smart filters, but I can't find a way to apply a vector mask to smart filters.
    As a workaround I make a selection from a path and make a filter mask from that selection. That works just fine, but I'm still wondering if it's possible to apply the vector mask directly to the smart filter.

    I don't believe you can add a vector mask directly to smart filters but you could add a vector mask from path to the layer.

  • Vector mask not crisp

    1) Drew a solid green rectangle
    2) Chose the shape tool again and set to Path option instead of shape layers
    3) Draw out an oval or rectangular path
    4) In layers panel, chose add vector mask
    Even though Density is at 100% and Feather 0px in the Mask panel, I'm getting fuzzy  / faded / or jagged/pixelated borders.  Is there some setting I need to adjust to make this a sharp vector mask.  I think it looked right before (with crisp borders) - not sure if I accidentally messed something up.
    Thanks

    Depending on what you're trying to mask, any pixels crossed by the border of the vector mask will certainly be partially masked in the interest of creating a smooth edge.
    But upsample the image to a higher pixel count and the edge of the vector mask remains as crisp as it was.
    Maybe I'm not understanding what you're expecting to see.
    This is normal:
    -Noel

  • Automatically adds a vector mask

    It automatically adds a vector mask whenever I use one of the two bottom tools in this image. http://sixpop.com/images/file/56049748.jpg how do I stop it from adding vector masks?

    No.
    You're creating a "Shape Layer" with your Pen Tool.
    Look at the group of 3 buttons near the left side of your Options Bar.
    Hover over each of them until the little Tool Tip appears.
    Experiment to see how each one affects what happens when you use the Pen Tool or create a Custom Shape.

  • Inactive Vector Mask - CS5

    I created a vector mask, selected the area I wanted to work with, previewed it as I was refining my shape. It was all fine. However,  I am not sure what I did that now both the inside and outside of the shape are greyed out and I can no longer see my vector mask as I orignally saw it. I am not sure if there is something I can do to have my vector mask again. Thanks in advance.

    See if the overlap mode (path operation) has changed or you combined paths that weren't combined before.
    Select the Path Selection Tool and in the tool options bar you'll see 4 overlap modes.
    (the paths(s) need to be selected for the buttons to be active)

  • Vector mask error after editing mask - Mac CS5

    Hi There,
    When I create a rounded corner vector shape then apply a gradient vector mask, the result is as expected - the gradient in the vector mask fades the object as per the mask.
    If I then edit the mask (either by moving the start/end points or try to make the end point not fully transparent) the gradient stops sharply.
    The result is an mask with a gradient that stops short about 30px from the end of the object - so I see the gradient stop and the mask just cuts off.
    Not sure what I'm doing wrong - any suggestions would be most welcome.
    Cheers
    Ben

    I've  run into this as well and believe it is a bug. While you can't avoid it, you can repair it.
    In the Layers panel, click the chainlink icon between the mask and maskee. This breaks the size relationship between the two objects.
    Select the mask in the Layers panel, then either use the Scale tool or the W and H fields in the Properties panel to correct the size.
    Relink the two objects by clicking in the chainlink area.
    HTH

  • How do you apply a vector mask to a folder in Photoshop CS6?

    The ways you apply vector masks in CS6 is different than in CS5.
    I knew how to apply a vector mask to a folder of layers in CS5.
    I cannot figure out how to do it in CS6.
    So my question is:
    How do you apply a vector mask to a folder in Photoshop CS6?
    And while we're at it, what are the best methods for applying vector masks to regular layers?
    Thanks.

    thomasbricker wrote:
    Im back...
    The thing is, Im not usiing the pen tool to create the vector shape. Im using the vector box tool to create a rectangle [...]
    Yes and that's why I wrote the words "vector tool" and never mentioned a pen. (Although the instructions would be exactly the same for using the Pen Tool because the Pen Tool is a vector tool.)
    which I then want to turn into a layer group mask.
    And yes, this does not work the same way as it did in CS5.
    I wish it did. : |
    Adding a vector mask to a layer or group is exactly the same in CS5.1 and CS6 on my Mac. Maybe that's done differently in CS5 than in CS5.1, but it seems unlikely.
    You have the layer or group targeted. Now draw a rectangular path after making sure the Rectangle Tool is in Path mode, and not Shape mode and not Pixel mode. Then Cmd/Ctrl-click the Add Mask button at bottom of Layers panel.

  • Vector mask targeting issue

    With a standard pixel based layer, when you hit the 'add layer mask' button at the bottom of the layers panel, the layer mask thumbnail is highlighted and targetted - as expected.
    If you hold Ctrl (PC) and hit the same button to 'add a vector mask', the vector mask thumbnail is not highlighted/targetted*
    I believe it should be - my next action would be to create a vector mask.
    * It is highlighted/targetted in CS5.

    You are correct, this is working differently than CS5. I will check to see if this was intentional.
    Thanks,
    Pattie

  • Fading A Drop Shadow - Missing 'Layer Mask Hides Effects' in CS5

    I'm using CS5.  I want to create a fading drop shadow on a shape/box. See the attached image below.
    In Photoshop, this is easy by doing:
    1) Create shape
    2) Add layer mask to shape layer
    3) Click gradient, set gradient to Multiply, and set gradient colors to white to black
    4) Drag gradient where you want it on the shape.  The drop shadow will actually bleed through the middle of the shape, and not just on the edges, which is unwanted.
    5) Open up layer styles, under Blending Options, select Layer Mask Hides Effects and it will get rid of the drop shadow showing up in the middle of the shape and you will be left with perfect, faded drop shadow on the edges (see below for finished product).
    Firework is missing step 5.  There is no Blending Options and there is no Layer Mask Hides Effects.   Or if there is, I have no found them. I am using CS5.  Any ideas how to accomplish this in Fireworks?

    Clone the shape. Change the color of the clone to gray and, in the properties panel, change its edge type to feather.  With the clone still selected, choose Commands > Creative > Auto Vector Mask. Select the bottom, left mask type by clicking on its image, and then apply it. In the layers panel, click on the new mask group to select it. Click on the black masking object on the right of the two linked objects to activate the gradient adjustment handle. Shorten and rotate the gradient until you get the effect you want.

  • Transform Vector Mask on Set  [CS4]

    Hello,
    I have problem with transform vector mask in CS4. Its impossible to transform ONLY vector without content in set. Previously, in CS3 it was easy, just select vector mask thumbnail and you could resize/rotate/move vector only.
    Thanks.

    denniskestelle wrote:
    Hello all,
    I've jumped from CS5 to CC and I notice working with vector masks (drawing a path on a layer) works completely different.
    I've got 2 issues, I can't seem to find a solution for:
    Issue 1: When I draw a path on a layer it becomes a mask for that layer.
    Not on my machine you must be adding the path to the layer as a vector  layer mask perhaps clicking the layer mask icon. Here is what I see on my machine. Or your creating a shape layer and not drawing a path on the layer. Look at the mode in the tool option bar was you draw the path.
    Here I transformed the path. Then I change the Path mode to be of the head not the background. Then clicked the mask button in the tool option bar to add the path as a vector mask.

  • Vector Mask Path doesn't show for CS6?

    When using pen or path related tools, I can still see the the path for the vector mask. But when clicking on the brush tool or any other tool not related to paths, the path for the vector mask disappears. The vector mask is also highlighted in the layers. There's no x mark or anything in vector mask. CS5 didn't have this problem. Is this CS6 function or not?
    CS6:
    Using Pen or Path related tools
    When clicking on Brush tool or others, paths disappear
    CS5:
    No problem with CS5

    Good day!
    CS5 didn't have this problem.
    This is just the way things are in CS6.
    Feel free to look for an existing Feature Request on this over at
    http://feedback.photoshop.com/photoshop_family/
    or post one if there is none to add your support to yet.
    Regards,
    Pfaffenbichler

  • Problem creating vector mask with Pen Tool

    Using Photoshop CS5, Mac OS 10.6.8
    I'm trying to create a simple vector mask using the pen tool to create a curved line at the top and bottom of a photo. Here's what I'm doing:
    1. Create a new layer and select it.
    2. Select Pen tool.
    3. Choose "work path" by selecting button at top menu.
    4. I draw my shape with the pen tool.
    5. Now comes the problem... I can not select this shape, or assign it a color. When I create a clipping mask, it does not recognize my path. When I throw away the layer, the shape is still there in outline only. What am I missing here? I'm familiar with doing this in Illustrator, but I don't understand how it works in PSD.
    I need some help, please.
    Thanks.

    The main thing i use paths for in photoshop is extracting objects from photos.
    Other uses include stroking paths with the paint tools. For example, if you had
    a powerline to remove, one could trace the line with the pen tool and then stroke
    the path with spot healing brush set to content aware fill.
    more info on photoshop paths:
    http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-73ada.h tml
    MTSTUNER

  • What is the purpose of the chain (lock symbol) between a solid color layer and its vector mask?

    What is the purpose of the chain (lock symbol) between a solid color layer and its vector mask in the layer panel when creating shape layers with a shape tool? I'm just curious when locking or unlocking the solid color layer and its vector mask can make a difference.

    I don't understand what you said and your shape layer looks different then mine using CS5.
    When the chain is deselected, I can't do anything with the move tool on the shape layer. This is the only difference I can find. Making the solid color uniform or not doesn't change anything.
    Your example shows that you moved the position of the solid color, how did you do that? I can create a solid color layer and change its uniform look by applying an effect like gradient but I can't move the solid color itself around. How is this possible?

  • How do I replace one vector mask with another?

    I have a template for a web site that I'm trying to figure out as I learn CS5.  The template has a vector mask created out of some writing that was converted into an object/vector mask.  I would like to replace with a layer I created that has different writing in it.  How would I replace the vector mask in the template with the new object I created?
    Thanks for any help you can give.
    Best -- Catherine

    • In the Layers Panel draw the Layer’s Vector Mask icon onto the trashcan-icon
    • move that Layer above the new Text Layer
    • invoke Create Clipping Mask (command-alt-G) from Layers Panel’s fly-out menu or alt-click on the line separating the two Layers’ icons

Maybe you are looking for