Illustrator to Photoshop script

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

roberthpaige

Illustrator to Photoshop script

Post by roberthpaige »

Hi, I need some help developing a script to export the vector objects from Illustrator to Photoshop, in separate layers, as shape layers (or smart objects).

The reason for this is to keep it's position the same while able to edit the smart object while back in Illustrator. So that way it doesn't lose the link connection between the two programs.

Thank you for any help on this, it's driving me crazy how Adobe hasn't given the option for copying and pasting vector objects to Photoshop, and allowing you to choose certain layers from Illustrator to be in their own layers in Photoshop.

http://i.imgur.com/8U3rNR9.jpg

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

pfaffenbichler

Illustrator to Photoshop script

Post by pfaffenbichler »

it's driving me crazy how Adobe hasn't given the option for copying and pasting vector objects to Photoshop, and allowing you to choose certain layers from Illustrator to be in their own layers in Photoshop.
The two applications are very different »beasts« and the teams are, as far as I know, separate so what you seem to expect seems pretty difficult to me.
That the teams are separate may be a good thing, though, considering the Illustrator team’s performance with regard to Scripting.

As far as I can tell not everything that Illustrator can express as vector data can (easily) be expressed as such in Photoshop.
As you seem to be willing to ultimately accept pixel data (Vector Smart Objects) your intended task might be achievable – but would simply exporting a psd with Layers from Illustrator not suffice then anyway?
Mike Hale

Illustrator to Photoshop script

Post by Mike Hale »

I also think it is not possible to script something like this because Photoshop does not support it. From the little I know of Illustrator scripting it should be possible to create a script that does what you show in the screenshot. But that does not meet your stated goal of "... edit the smart object while back in Illustrator." The screenshot shows four smart object layers so you have 4 versions of the original illustrator file not one smart object with the object on separate layers.

A smart object is a layer so you can't place one file( or object ) into separate layers. You might be able to come up with a script that could place each layer in the Illustrator document into nested smart objects in one smart object layer. But I don't see the benefit from doing that.
larsen67

Illustrator to Photoshop script

Post by larsen67 »

Mike, did we not have issues with an AI to PS script before now…? I recall a problem with getting AI to take focus again for the copy and paste when looping using BridgeTalk…?
roberthpaige

Illustrator to Photoshop script

Post by roberthpaige »

Mike Hale wrote:I also think it is not possible to script something like this because Photoshop does not support it. From the little I know of Illustrator scripting it should be possible to create a script that does what you show in the screenshot. But that does not meet your stated goal of "... edit the smart object while back in Illustrator." The screenshot shows four smart object layers so you have 4 versions of the original illustrator file not one smart object with the object on separate layers.

A smart object is a layer so you can't place one file( or object ) into separate layers. You might be able to come up with a script that could place each layer in the Illustrator document into nested smart objects in one smart object layer. But I don't see the benefit from doing that.


Exactly. The point would to be able to move all those smart objects around without going back into illustrator, while retaining the vector object when scaling, where as the export function from illustrator will not retain the smart object function, and rasterize the layer.
Mike Hale

Illustrator to Photoshop script

Post by Mike Hale »

Yes, but I don't remember if it was a focus or timing issue. But I never got copy/paste from Illustrator to Photoshop to work.

But what I had in mind wouldn't use the clipboard. It would either save the current Illustrator document or use an existing .ai file. In Photoshop it would place the file as a smart object then open it for editing. Everything else would just be sending data about the layers and object back and forth.

Something like find the number of layers. Use that number to dupe the smart object. Then in turn open each duped smart object for editing in Illustrator, hide all the layers except for the one for this copy of the smart object and save.
Mike Hale

Illustrator to Photoshop script

Post by Mike Hale »

roberthpaige wrote:Exactly. The point would to be able to move all those smart objects around without going back into illustrator, while retaining the vector object when scaling, where as the export function from illustrator will not retain the smart object function, and rasterize the layer.

It might be possible to have one smart object for each Illustrator layer. I think the key would be using Photoshop's place instead of Illustrator's export.