Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Junior Member
    Join Date
    Mar 2017
    Posts
    13
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    45
    Level
    2
    Lv. Percent
    42.33%
    Achievements Sprout

    Transfer paths or masks from one document to another

    Hi guys,
    Im kind of getting gray hair waay in advance trying to find out if this is possible at all. I have two different cases and Im gonna try to explain them as good as possible below.
    I am working with a high volume of images so this would save us a lot of time if we could automate it instead of doing this job manually.

    Case 1, Paths)
    We are sending jpeg's to parters in Asia to get clipping paths of skin, hair, background & foreground. Meanwhile they are doing paths we are working on our PSD working files. So we can't send our working files to them, also, they do not accept PSD files.
    Later we get the files back from our Asian partner and want to transfer the paths they've done from the jpeg to our working files. And here is where my issue is. In a dream scenario there would be a hotfolder or a script or similar where I can drop the files including the paths and that they pair and applies on our working files. It is of course not only important that they match to the correct file, but also that they gets placed correctly. The files we send to Asia always have the same dimensions as our working files.
    The steps I am thinking is kind of, but it is probably more complexed:
    1) Open jpeg with paths
    2) Find PSD file with matching file name
    3) Copy all paths from jpeg
    4) Paste all copied paths at the right position in PSD
    5) Save and close
    6) Continue with the next file


    Case 2, Masks)
    Kind of the same as above but instead of paths we are using masks applied on folders in the layer tab.
    We are sending jpeg's to parters in Asia to get masks of skin, hair, background & foreground. Meanwhile they are doing masks we are working on our PSD working files. So we can't send our working files to them, also, they do not accept PSD files.
    Later we get the files back from our Asian partner and want to transfer the masks they've done to our working files. In this case, since they are doing masks, we receive tiff files. And again, here is where my issue is. In a dream scenario there would be a hotfolder or a script or similar where I can drop the files including the paths and that they pair and applies on our working files. It is of course not only important that they match to the correct file, but also that they gets placed correctly. The files we send to Asia always have the same dimensions as our working files.
    The steps I am thinking is kind of, but it is probably more complexed:
    1) Open tiff with masks
    2) Find PSD file with matching file name
    3) Copy all masks from tiff
    4) Paste all copied masks at the right position in PSD
    5) Save and close
    6) Continue with the next file


    If you think you will be able to find a solution on one or on both cases above but you need files to try it on - please let me know and I can send you some files to try it on.

    Thanks!
    //Pierre

  2. #2
    Guru MrToM's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    3,346
    Post Thanks / Likes
    Mentioned
    198 Post(s)
    Activity
    Points
    14,067
    Level
    34
    Lv. Percent
    42.1%
    Achievements AdvocatePost VisionaryCelebrityQualified to Freelance
    Awards FreelancerScholarChallenge WinnerChallenge CreatorPhotoshop Guru

    Re: Transfer paths or masks from one document to another

    I'm almost there with the first half but a quick question...

    When the paths are pasted into the PSD file do they need to be separate or can they all be part of one workpath?

    I have it working but all the paths are merged into one workpath.....would that be a problem?

    I'll work on it while awaiting your reply so its possible this question could now be obsolete.

    Regards.
    MrToM.


    Did you know?
    The fleshy bulb at the base of the thumb is called the 'thenar'

  3. Likes Pipsmom liked this post
  4. #3
    Junior Member
    Join Date
    Mar 2017
    Posts
    13
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    45
    Level
    2
    Lv. Percent
    42.33%
    Achievements Sprout

    Re: Transfer paths or masks from one document to another

    Hi MrTom,
    Wow, that's amazing!

    The paths would need to be separate and not merged since we use these to create masks for different purposes.

    Thanks a lot for your effort!!

    Very best,
    //Pierre

  5. #4
    Guru MrToM's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    3,346
    Post Thanks / Likes
    Mentioned
    198 Post(s)
    Activity
    Points
    14,067
    Level
    34
    Lv. Percent
    42.1%
    Achievements AdvocatePost VisionaryCelebrityQualified to Freelance
    Awards FreelancerScholarChallenge WinnerChallenge CreatorPhotoshop Guru

    Re: Transfer paths or masks from one document to another

    OK...no worries....try this:

    INSTRUCTIONS.....a bit tricky but bear with it...

    BACKUP YOUR PSD FILES FIRST!!!

    1. Unzip and run the script.
    2. Select the JPG folder.
    3. Select the PSD folder.
    4. Told you it was tricky.

    What it does:
    1) Open jpeg with paths...........................................CH ECK.
    2) Find PSD file with matching file name.....................CHECK.
    3) Copy all paths from jpeg.......................................CHECK.
    4) Paste all copied paths at the right position in PSD....CHECK.
    5) Save and close............................................. .......CHECK.
    6) Continue with the next file....................................CHECK.

    If a matching PSD cannot be found the script will stop and the faulting JPG left open so you know which one has failed.

    If this happens then REPLACE the PSD files with your backups...you can run it again without but I have had problems....best to use new copies.

    You can select the same folder for both the JPG files AND the PSD files if you wish.

    I don't guarantee it will work perfectly, and if it doesn't then just let me know.

    It took a fair while to code this so I'll let someone else do the second half.

    The script:

    copy_and_paste_paths_MT_00.zip

    Regards.
    MrToM.


    Did you know?
    The fleshy bulb at the base of the thumb is called the 'thenar'

  6. Likes Pipsmom liked this post
  7. #5
    Junior Member
    Join Date
    Mar 2017
    Posts
    13
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    45
    Level
    2
    Lv. Percent
    42.33%
    Achievements Sprout

    Re: Transfer paths or masks from one document to another

    This is brilliant, thanks a lot! I will try this right away!
    One more question.. Would it be possible to create a hot folder or similar that trigger the script? Or is it possible to do it in a even more simple way than that I need to go to File --> Script --> Browse --> Select the script each time when I want to run the script?

    If not that is totally fine, Im super happy with what you've done!!

    Very best,
    //Pierre

  8. #6
    Junior Member
    Join Date
    Mar 2017
    Posts
    13
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    45
    Level
    2
    Lv. Percent
    42.33%
    Achievements Sprout

    Re: Transfer paths or masks from one document to another

    Hi again MrTom,
    I tried to run the script now on some test files, but unfortunately I get a error msg. See attached. I am running the latest version of photoshop 2017.0.1

    Transfer paths or masks from one document to another-screen-shot-2017-03-31-23-48-58-png

  9. #7
    Guru MrToM's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    3,346
    Post Thanks / Likes
    Mentioned
    198 Post(s)
    Activity
    Points
    14,067
    Level
    34
    Lv. Percent
    42.1%
    Achievements AdvocatePost VisionaryCelebrityQualified to Freelance
    Awards FreelancerScholarChallenge WinnerChallenge CreatorPhotoshop Guru

    Re: Transfer paths or masks from one document to another

    I can think of 3 things you could do...

    1.
    If you have the Extendscript Toolkit you can open and run the file from there...PS needs to be open and the Toolkit connected to it.


    2.
    Alternatively you can copy the script to your Adobe install Scripts folder...

    C:\Program Files\Adobe\Adobe Photoshop CC 2015.5\Presets\Scripts

    Then use FILE > SCRIPTS and select the script to run it.


    3.
    Use the Script Events Manager, FILE > SCRIPTS > SCRIPTS EVENT MANAGER, to run the script when firing a particular event...Opening PS for example, or creating a new file.


    As far as I know, for security reasons there is no way to link folders outside of PS, if that's what you mean by 'hotfolder'. Could be wrong though.

    Regards.
    MrToM.


    Did you know?
    The fleshy bulb at the base of the thumb is called the 'thenar'

  10. #8
    Guru MrToM's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    3,346
    Post Thanks / Likes
    Mentioned
    198 Post(s)
    Activity
    Points
    14,067
    Level
    34
    Lv. Percent
    42.1%
    Achievements AdvocatePost VisionaryCelebrityQualified to Freelance
    Awards FreelancerScholarChallenge WinnerChallenge CreatorPhotoshop Guru

    Re: Transfer paths or masks from one document to another

    Quote Originally Posted by ppersson View Post
    Hi again MrTom,
    I tried to run the script now on some test files, but unfortunately I get a error msg. See attached. I am running the latest version of photoshop 2017.0.1
    Can you confirm that are no paths in the PSD files already.

    This is similar to the error I spoke of...the files need to be clean of paths.

    If they are then I'll see if I can replicate it on 2017 but as 2017 isn't very stable there is no guarantee it'll work whatever I do.

    Regards.
    MrToM.


    Did you know?
    The fleshy bulb at the base of the thumb is called the 'thenar'

  11. #9
    Junior Member
    Join Date
    Mar 2017
    Posts
    13
    Post Thanks / Likes
    Mentioned
    0 Post(s)
    Activity
    Points
    45
    Level
    2
    Lv. Percent
    42.33%
    Achievements Sprout

    Re: Transfer paths or masks from one document to another

    Hi,
    Confirmed, no paths in the PSD's already. They are clean.

    Thanks for your help!

  12. #10
    Guru MrToM's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    3,346
    Post Thanks / Likes
    Mentioned
    198 Post(s)
    Activity
    Points
    14,067
    Level
    34
    Lv. Percent
    42.1%
    Achievements AdvocatePost VisionaryCelebrityQualified to Freelance
    Awards FreelancerScholarChallenge WinnerChallenge CreatorPhotoshop Guru

    Re: Transfer paths or masks from one document to another

    OK.

    Let me try it here...it may be tomorrow now as its late here but leave it with me.

    Regards.
    MrToM.


    Did you know?
    The fleshy bulb at the base of the thumb is called the 'thenar'

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About Photoshop Gurus
Photoshop Gurus (PSG) is a friendly community of designers and artists who enjoy all things related to Photoshop. PSG can consider itself one of the oldest Photoshop sites and has recently had it's 10th anniversary. We've come a long way and have every intention to continue supporting the Photoshop community. Photoshop can be an overwhelming program for beginners and that's how we try to help. We have a friendly forum, tutorials and all resources to help you understand this wonderful program. Feel free to look around and if you have any questions, don't hesitate to ask. Happy browsing!