Home Technical Talk

[Maya script] Maya selections to Photoshop paths

c.buliarca
polycounter lvl 9
Offline / Send Message
c.buliarca polycounter lvl 9
Hi,

I've created this script that takes the selected edges, faces and objects and create paths and selections into your Photoshop opened document

Here is a video explaining the script.
https://www.youtube.com/watch?v=tJ4Sl0YrImc


You can download it from here:
http://buliarcatools.blog.fc2.com/
or
http://www.mediafire.com/download/6ajpvdvbi3uvp5j/edgeToPSSelection.rar

The idea is not original, I've seen Chris Cunningham's(passerby) video here:
https://www.youtube.com/watch?v=0kWXI7FdIuM,
and decided to wait for it, but I've needed the script for one of my projects, I've done it, and now I'm sharing it maybe some of you will need it to.

Replies

  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    good job tackling the problem, haven't tried it, but what approach did you take running things through the com interface and controlling photoshop from mayas python interpreter. or writing JS code for Photoshop to run?

    Also where you able to get past the performance problems with building the selection 1 vert at a time in ps?
  • c.buliarca
    Offline / Send Message
    c.buliarca polycounter lvl 9
    I didn't used the com interface, to send the selections to PS I've just created a .jsx file that is executed by subprocess.Popen() command...

    My approach was like this: flatten the selected edges or faces as their uv's then just use the polyToCurve to create a curve, and read after that the curve's cvs positions, than in Photoshop I've created paths which by script where used to make selections
  • throttlekitty
    That's awesome, thanks for sharing!

    And passerby, what's the song in your video? I need it.

    edit: im in ur tabs.

    https://www.youtube.com/watch?v=9Wh2HgBRRPs

    I should play this game sometime.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    its music from bastion throttlekitty.

    ah, ya in my case i was reading the UV data its self, worked pretty good just was getting problems on uv seams.

    are you handling stuff outside of the 0 to 1 uv space?
  • c.buliarca
    Offline / Send Message
    c.buliarca polycounter lvl 9
    Yes, the script it's taking care of uv's outside the 0-1 space and also it duplicates the selection if there are tillable uv's(uv shells that starts on 0-1 and finish on 1-1 for example)

    At a first glance I've reed out the uv's data also, but then I had the problem with the uv borders as well so I've realized that it's faster to transform the geo to uv positions and let the maya polyToCurve to take care of the flow for the edges... The only problem with that it's the fact that maya doesn't create curves from all the edges, so I had to create a check to see if all the selected edges from one shell where used for the curve creation, if not make another curve for that.

    Any way thank you for taking interested into my script, hope you will find it useful, and I hope you're not mad on steeling your idea...:)
  • c.buliarca
    Offline / Send Message
    c.buliarca polycounter lvl 9
    I've added one option to the script, "Smooth Path" this will take the selection and create smooth paths in Photoshop like this screenshot example:

    smoothEdgToPSD.jpg
Sign In or Register to comment.