Replacing subPathItems in a vector mask

It seems one can fairly easily replace a Layer’s Vector Mask with another one’s, but I fail to see if I can simply replace the Vector Mask’s subPathItems with a new array.
A pathItem’s subPathItems being read only this seems improbable, but still …
And on a related note: Do any of you know if one can create a Vector Mask without first creating a pathItem proper?
Because currently I have the Scripts create Paths, create Solid Color Layers with the Paths selected and then delete the Paths again, which seems to be a longish route.
Thanks for any input.

You can create a empty vector mask with a script.
    var desc13 = new ActionDescriptor();
        var ref10 = new ActionReference();
        ref10.putClass( charIDToTypeID('Path') );
    desc13.putReference( charIDToTypeID('null'), ref10 );
        var ref11 = new ActionReference();
        ref11.putEnumerated( charIDToTypeID('Path'), charIDToTypeID('Path'), stringIDToTypeID('vectorMask') );
    desc13.putReference( charIDToTypeID('At  '), ref11 );
    desc13.putEnumerated( charIDToTypeID('Usng'), stringIDToTypeID('vectorMaskEnabled'), charIDToTypeID('RvlA') );
    executeAction( charIDToTypeID('Mk  '), desc13, DialogModes.NO );
But as you pointed out pathItems are read only so it doesn't do much good unless you want the script to create a blank vector mask for the user to edit after the script is done.
Because you can't edit an existing path, the way you are creating vector masks is the only way I know. New path, mask from path, remove path.
The only way I know to 'edit' an existing path with scripting is to read the existing path converting into SubPathInfo and PathPointInfo which can be edited. Then delete the old path and create a new one from the edited data.
For a vector mask you add the extra steps. i.e. you read/convert the vector mask's path data, delete the mask, create a new path with the edited points, make a mask from that new path, then delete the new path.

Similar Messages

  • 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

  • Question on Vector Mask Functionality

    Hello everyone, I'm fairly new to Photoshop CS 5 so I apologize if I am asking the wrong type of questions, here goes:
    When working with Vector Masks can you:
    1) "Link" or "share" one image's vector mask with other images? (ex. If I made "Building A" then duplicated it, but then wanted to change what Building A looked like, I would only have to change the source mask and the copies would be updated.
    2) Move the image independent of the vector mask (it seems like I can only move the vector mask, not the image itself). Or in other words: can I move the image and have the mask follow it, instead of only being able to move the vector mask inside of the image boundaries?
    My application of the question:
    I'm making a 2D top down layout of a "city block" type area. To fill in the buildings, I've made Building A,B,C etc, and use multiple copies of each building. Ideally, I would like to be able to "link" or share say Building A's vector mask with all the other instances of Building A (so that when I change the master, they all change to the new mask shape). The second behavior I'm trying to find is the ability to move the layer without moving where the Vector Mask is on that layer (since it seems that you can only move where the mask is, meaning that even if I could share masks, they would all end up in the same place meaning I would have to re-position each one by hand again.
    Any ideas are appreciated, thank you for reading.

    When working with Vector Masks can you:
    1) "Link" or "share" one image's vector mask with other images? (ex. If I made "Building A" then duplicated it, but then wanted to change what Building A looked like, I would only have to change the source mask and the copies would be updated.
    Yes, this is possible, but not with the classic layer vector mask system in Photoshop. Layer masks are part of a layer, and not individual layers themselves, so they cannot be converted into a reusable object.
    The solution is to avoid vector layer masks, and use a clipping mask/layer instead. A clipping mask/layer CAN be converted to a reusable smart object, and when you change one, all the other instances change as well.
    The second part of the solution is to convert both the content layer(s) and the clipping mask/layer to a smart object. Then group the lot. Incidentally, if your buildings are made up of several elements you merely have to include those additional elements in the clipping group. Another advantage is that each elements can still have its own regular layer mask. Win win situation. And layer effects can be applied to clipping layers/masks, which is again impossible for layer masks. It also opens up the gates to a far less destructive workflow.
    2) Move the image independent of the vector mask (it seems like I can only move the vector mask, not the image itself). Or in other words: can I move the image and have the mask follow it, instead of only being able to move the vector mask inside of the image boundaries?
    This is also solved when using clipping masks/layers - both the content and the mask can be moved independently as regular layers. Another advantage is that both can also be transformed individually.
    My application of the question:
    I'm making a 2D top down layout of a "city block" type area. To fill in the buildings, I've made Building A,B,C etc, and use multiple copies of each building. Ideally, I would like to be able to "link" or share say Building A's vector mask with all the other instances of Building A (so that when I change the master, they all change to the new mask shape). The second behavior I'm trying to find is the ability to move the layer without moving where the Vector Mask is on that layer (since it seems that you can only move where the mask is, meaning that even if I could share masks, they would all end up in the same place meaning I would have to re-position each one by hand again.
    Any ideas are appreciated, thank you for reading.
    So here is my solution. I made a sample with two top view buildings that should be reused the way you want:
    1) FIrst create groups for each building, and put the content in those. Then trace vector layer shapes over the content. Set the transparency for the mask layers to a sensible opacity setting for easier masking.
    2) Put the vector shape below the content layer for each building. Then for (1) and (2), <ALT> click on the border between the content and the shape layer. (<OPTION> for Mac) This will mask the building content. (3) Do not forget to reset the layer opacity for the shape layers back to 100%!
    3) Next, let's convert these building into recyclable objects. Convert each content and clipping mask layer to a smart object. Then rename those smart object layers to something sensible (honestly, I forgot to label the layers properly earlier, but you catch my meaning here ;-)
    Done! To clone each building, duplicate the layer groups. For each instance you can move the content (handy if you are sharing multiple building graphics in the same bitmap or illustrator file), or you can decide to move the mask instead. Or both. Same holds true for transforming. Your choice. To move or transform a building, select the layer group.
    To change or amend the masks or content, double-click on the smart object of your choice, and make some changes.
    Also, don't forget that you can insert additional elements in a clipping group by placing it above the first clipped layer, and then <ALT> clicking again on the border between them. So in theory you could start constructing different looking buildings by adding in other smart objects in the clipping groups. The sky is the limit! This way you can create several building blocks to construct various buildings with different looks. And still limit the number of blocks - and all update-able.
    Unfortunately, this is where the workflow breaks down a tad: due to the smart object's implementation in Photoshop you CANNOT edit the mask or building's content in context - instead it opens up in its own file window. This can be somewhat mitigated by placing both windows side by side (window->Arrange-->Two-up Vertical).
    This brings us to the second caveat: when you do make a change, the edits are not updated in realtime in the master document. You must first save. Again a bit of a workflow breaker, but still... At least you now have a non-destructive instanced workflow.
    The smart object content can be replaced easily with a right-mouse click on the smart object layer itself. Or use a externally referenced smart object instead if you prefer to generate your buildings in an external application.
    Btw, Photoline's layer system is far more logical and easier to use for this type of work. Layer masks behave like regular layers. Layers, groups, masks, external file layers, and so on can be virtually cloned and instanced like smart objects, but the master object is editable in context, and all the other instances update in realtime. So it is more convenient. At least, that is my experience.
    Hope this was helpful! Now go build your cities. :-)
    PS: I was thinking: isn't Illustrator or InDesign is far more logical choice for this type of work where you need access to reusable blocks of content? It would also be a more efficient and speedier workflow - Photoshop isn't really meant for this type of work. And Illustrator and InDesign potentially provide better output quality. You can also divide your work in pages, and so on. Then again, you would probably lose the flexibility of smart objects.

  • After updating my Flash Player, the Auto Vector Mask window is now blank.

    After updating my Flash Player, the Auto Vector Mask window is now just a blank window.

    You can replace the "Auto Vector Mask" SWF file present at the "Fireworks installation folder/Configuration/Commands/Creative/Auto Vector Mask.swf ".
    If this doesn't work, then one of the reasons that it could be happening is if Firebug or Flash Firebug is installed.
    If you have either of those, can you uninstall them and relaunch Fireworks.
    Let me know if it works.

  • Pasting a path automatically creates a vector mask...

    Hi, it appears that Adobe has modified the way pasting paths behaves. Prior to CC when you pasted a path it would paste as a path, as expected. Now when you paste a path it automatically pastes the path as a vector mask. Is there anyway to stop it from doing this. The only workaround I have found is to create a new path layer first and then past the path which is totally unnecessary and a waste of time. This is another slight tweak that Adobe has undertaken that has totally ruined my working process. At this rate I will be cancelling my subscription. Why meddle with and tweak things that do not need fixing? I really hope this can be solved.
    Thanks.

    There have been changes to pasting paths.  Here is what Adobe told me about it:
    The general rule is that the topmost selected path, if it exists, will get the pasted path. Otherwise if a layer is targeted a new vector mask will be made of the pasted path for that layer. Otherwise if no path or layer are selected, the work path will be set and targeted. Note a subtlety here: if a layer with a vector mask is targeted but the vector mask itself is not selected in the paths panel, a paste will replace the vector mask instead of append to it. In such a case if the user wants to append to the layer's vector mask they should select it in the paths panel first.

  • Vector mask corruption?

    For several months I have had random shapes appear in my files when using vector masks. The scrambled imagery only appears at random and at certain zooms (over 25%) and will disappear upon restart of Photoshop. If I flatten the file, it will retain the scrambled imagery, but otherwise it seems to not actually corrupt the data, just the view on screen. Any ideas? I've been fighting this for months and have replaced drives, video cards, and it still persists.

    I'm running OS X 10.6.8 on a Mac Pro quad core. 2.4 GHz processor speed. 32 GB of memory. I have a ATI Radeon HD 5770 and Nvidia Ge force 8800 GT video cards and an Eizo CG243W.
    The issue I believe has been present for about a year, I'm running CS6 which has been re-installed a couple times and is up to date. I generally only run PS, Chrome, Outlook, and iTunes. Although will end up with AI and Acrobat and sometimes InDesign on occasionally.
    My machine has also been fully wiped and the OS re-installed. We've also swapped out my data drives. There is also often a scrambled patchwork on re-draw, while opening files in PS, or zooming in. My instinct says its a video card monitor PS thing but the video cards have also been swapped out with no difference.

  • Sharing a vector mask that shapes effects

    I want to have multiple effects on a shape defined by a vector mask: two strokes--with different blend modes--and a bevel. Because I need different blend modes, I cannot use the trick of using a two-color gradient for the stroke. Because of the order in which effects are applied, I cannot use inner glow, stroke, and bevel. (I can't get the inner glow to apply correctly.)
    I can get the result I want by duplicating my shape layer and applying different effects to each layer, using 0% fill. However, changes to the shape of the vector mask on one layer must then be propagated to the other layers. (Tip: this isn't as bad as it sounds if you alt-drag the vector mask from one to another, replacing the destination with the updated shape.)
    I could almost get the result I want by putting the vector mask on a group for multiple layers, except that the opacity of the group doesn't shape the layers within it.
    Is there any way you can think of to use a single vector mask that shapes the effects for multiple layers?

    Kind of hard to recreate the unseen, but maybe this example will help.
    Right clicking on the elayer effect will give you the option to create layers. This will put the effects onto their own layer. Duplicating the stroke layer and changing the blending mode should then be possible like the attached image.

  • How do I move a pattern layer independent of its vector mask?

    I've created a pattern fill layer and assigned a vector mask to it. How do I move the pattern around without affecting the mask? I realize if I want to rotate the pattern I'd need to convert it to a smart object, but if I only need to adjust the pattern location there must be some way to do that without moving the vector mask along with it. A traditional layer shows the vector and raster mask layer with a lock icon, but fill pattern layers are different for some reason. Can someone "fill" me in?

    rcraighead wrote:
    Yes, I understand that. I am working with pattern layers, not layers filled with a bitmap pattern.
    That is not what your showing above in red above your showing a shape layer in CS6 a pattern fill layer with a vector mask is a cs6 shape layer. Even the icon on the layer's content in the layers palette shows its a shape layer.  You can edit the vector mask you can not unlink it. For its a cs6 shape layer.  As you noted you can first convert pattern fill layer into a smart object layer. It then acts like a normal pixel layer with an associated transform to the canvas size. Your no longer dealing with a pattern fill layer. When you rotate it you will have the same problem with the layers corners areas.  CS6 changed shape layers design they have more options then prior  versions of Photoshop and prior versions of Photoshop can not handle CS6 shape layers that used cs6 shape options like stroke, line type, and pattern fills.

  • What's the process to replace an image inside a mask?

    Hi There,
    The new replace image function is a massive time saver but it doesn't seem to work with masked images.
    These images are masked because they're part of an animation so I really need to replace them - not re-import and re-create the animation from scratch.
    If this isn't possible, how do I remove the mask? That way I could just delete the mask, replace the image, then re-mask.
    Any pointers in the right direction would be much appreciated.
    Cheers
    Ben

    The image replace works perfectly with a masked image intact,  only if the two images dimensions are the same.
    However, doing the following gets you 95% of the way with just a final tweak of the mask:
    select the image on the slide
    Format > Copy Animation
    then replace image
    Format > Paste Animation
    Format > Image > Edit Mask

  • 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?

  • Again, has anyone experienced any issues concerning the auto vector mask option in Fireworks when trying to fade an image?

    I have a major issue that I have tried to resolve on many levels, to no avail. The auto vector mask pop up window is empty when I choose it to fade an image in fireworks. Can anyone please assist. Thanks.

    All those commands use Flash for their GUIs - is the Flash player installed on your system?
    Are you on Mac or Windows? It works fine for me on Windows.

  • Vector Mask Feather

    When I use the feather options on a Vector mask, it works but when I save the file, close it and open it again the feather settings are reset back to zero. I am using Photoshop CS4 Extended on windows XP. I saw that a mac user was having the same problem but they asked their question a while ago and their question hadn't been answered yet.

    Please explain, step-by-step, what you have tried.
    Take us from opening the file through what you've done to try to feather out the vector mask.
    LenHewitt, "How To Get Help Quickly" #, 4 Mar 2004 8:27 am

  • Can anybody say why In the layer menu the background color is white when opening a layer mask, and why does it automatically turns black by simply opening the layer mask properties menu? The vector mask is white anyway.

    Can anybody say why In the layer menu, the background color is white when opening a layer mask, and why does it automatically turns black by simply opening the layer mask properties menu? The vector mask is white anyway.

    Topic or subject titles should be clear, pertinent and concise so that individual users can tell at a glance if they can help or not.
    That field is not for attempting to fit your entire question in there.
    Please keep this in mind next time you post.  Thank you.
    A lot more information about your hardware and software is needed.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CC", but something like CC2014.v.2.2) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    a screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • 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.

Maybe you are looking for

  • Updating List View Web Part property in page

    I have a List View web part (In the page > Add web part > App > document library name). I need to update the TitleUrl property of this web part through C# code. The SaveChanges() method below works for my visual web parts, but not for the List view w

  • Read encrpted zip file and ftp unzip file

    Hi, I have a situation,where i need to read 3 zip files, which are encrpted, and each zip file may have lot of images and text files. all i want to do is, read these 3 zip files and unzip + ftp to another directory. No mapping is involved. if the thr

  • Why Does CS3 load into Program Files (x86) in Vista 64bit

    I built a computer with Vista 64bit. All my CS3 files loaded into Prpogram Files (x86). Doesn't that mean they will only run at 32bit?

  • Help! layers change position from document window to browser window

    dear all, i have a single page site with buttons on which when clicked on show or hide layers. BUT I have the age old problem in that the layers appear in a different position in the browser window than where I positioned them in the document window.

  • Alert Generation through PPF framework in SNC

    Hi, I Want to know where is the setting needs to be done for PPF genareated alerts. Whether PPF generated alerts can be configured in such a way that we will recieve these alerts through mail. Please explain if anyone worked on this. Regards Raghaven