View previous topic :: View next topic |
Author |
Topic : "Illustrator batch operation for live trace 10 file limit" |
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Tue Apr 17, 2007 1:52 pm |
|
 |
I have a load of bitmaps I need to vectorise but the batch function you can access via Bridge limits you to 10 files! This is immensely irritating as it adds another needless operation to my workflow. Is there any way around this?
Additionally I need to open all these files in Photoshop, but I have to go through several dialogues for each file to set how the ai files are rasterized. Is there a way I can set the options once for all the ai files i open?
I would greatly appreciate any help people might be able to offer. |
|
Back to top |
|
B0b member
Member # Joined: 14 Jul 2002 Posts: 1807 Location: Sunny Dorset, England
|
Posted: Wed Apr 18, 2007 1:53 am |
|
 |
find a peon..
i'll have a dig around |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Wed Apr 18, 2007 3:34 am |
|
 |
Adobe Extendscript, a javascript based language for automating and extending the functionality of adobe products. Photoshop can be fairly easily controlled by it, I'm not sure about Illustrator and Bridge but I'd imagine so. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Wed Apr 18, 2007 5:49 am |
|
 |
Ok, I had a dig at this... since I have done some extendScript before and wanted to brush up on some skills. I'll revisit it tomorrow when I have more time, but for now it demonstrates the concept and you'll have to modify it to your wishes until I return.
http://www.motionreactor.net/misc/Trace_Bitmap_SaveAsEPS.jsx
Right Click > Save As...
From Illustrator: File > Scripts > Other Scripts
Then... it just opens the image you select, traces it (default settings), saves an eps under the name you specify and finally closes the document.
I'll be back to revisit the script and make it actually useful for you. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Wed Apr 18, 2007 5:54 am |
|
 |
I gtg to bed badly, but I'll integrate this script I wrote a while ago and it should allow you to select a folder and then it does it all. See u tommorrow.
This one is written for Photoshop, I have no idea what will happen if you run it from Illustrator. It probably works actually...
http://www.motionreactor.net/misc/Batch_Remove_Paths.jsx |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Wed Apr 18, 2007 1:07 pm |
|
 |
I really appreciate your help Ian, I'm pretty clueless with scripting.
I ran the first illustrator script you posted but get an error after trying to save.
"Cant print the illustration. Cant save the illustration"
and
"Error 8700: the operation was cancelled
Line:28
->app.activeDocument.saveAs(fileRef2,saveOpts);" |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Thu Apr 19, 2007 4:33 am |
|
 |
Np, I don't mind helping... really it's a good excuse to brush up on some extendscript skills and add another notch in the resume.
ahh yeh, im not too sure what the error is exactly... but I'll have to look at it another time. Too busy atm, maybe tommorow night. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Thu Apr 19, 2007 4:35 am |
|
 |
just to make sure, don't add an .eps extension on the end of the filename when you save... it may have something to do with the error? |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Fri Apr 20, 2007 4:31 pm |
|
 |
I didn't add any extensions, I'm wondering could it be because of an inconsistency between our setups? |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Sat Apr 21, 2007 6:17 pm |
|
 |
yes its probably something like that. what version of illustrator are you using? This script works for me on cs2 windows. I'll get back to it soon, just not at home atm... so will look at it later tonight. |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Sat Apr 21, 2007 8:08 pm |
|
 |
I'm also running CS 2 on windows. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Sun Apr 22, 2007 12:07 am |
|
 |
Hey, well I think I've got it now... had a bit of trouble getting it to work with Folders and save the correct file, but all is good now. I hope it works for you.
Next on the agenda is to see if I can customise the tracing options based on a tracing preset you configure yourself and save.
http://www.motionreactor.net/misc/Batch_Trace_Bitmap_SaveAsEPS.jsx |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Sun Apr 22, 2007 12:08 am |
|
 |
Oh I should note that there is an apparent bug after processing approx 500 files... according to the help guide. So try it in chunks of 500. |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Sun Apr 22, 2007 6:35 am |
|
 |
This is really helpful Ian, thanks. The 500 file limit isn't a problem as I'm pretty sure there are no sequences with that may frames.
I tested the script three times and the first two times in failed to process a file, Its definitely not a problem with the images as both times it was a different file and on the third time all files processed fine. Shouldn't really be a problem though, I can run the trace operation manually on the images if a few don't process.
Could you make the script use whichever tracing preset is set as default in the trace settings? Then I can set my preset as the default and it will always use that rather than choosing a preset each time? |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Sun Apr 22, 2007 1:04 pm |
|
 |
what errors are you getting? I'll get it to use a preset soon, yet to figure that out atm. |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Sun Apr 22, 2007 4:49 pm |
|
 |
It just said something along the lines of "something strange happened with so and so file" then i clicked OK and it carried on again. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Mon Apr 23, 2007 1:18 am |
|
 |
Ahh yes, I'll clean up that error message. It basically just means it couldn't process that file for some reason. It's just to let you know u may need to manually process it. Would you prefer that it had this feature? or that you could let it run unassisted? |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Mon Apr 23, 2007 2:52 am |
|
 |
Yeah leave the message, its not a problem, I can make a note of any frames I need to do manually. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Mon Apr 23, 2007 3:25 am |
|
 |
Better yet I'll make it report the files which were skipped at the end of the batch process. Try it now, hopefully it works alright. I got an error on a large batch run, one which I can't easily fix AFAIK but on the whole you should be able to get some use out of this script. Making it totally robust is probably going to be an overkill not to mention difficult. |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Mon Apr 23, 2007 7:50 am |
|
 |
I tried the script a few time again. The first time I got an out of memory error which was strange as there is plenty of ram and HD space, also i think it tried to process the eps files once they were done. I tried it a few more times and this didn't happen again. Sometimes some of the images are left open in illustrator i think that might have been what caused the out of memory error. Generally though the script works great, Ill give you a mention on the end of our animation . One thing though, I changed the default tracing style but it didn't change the output of the script, did you add that bit? |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Mon Apr 23, 2007 12:40 pm |
|
 |
ahh no, im still working on that preset part... I'll look a it again soon. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Sun Apr 29, 2007 4:34 am |
|
 |
just posting to let you know i haven't forgotten about it, just too busy with other stuff atm. I'll take a look at it as soon as I get a chance. |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Wed May 23, 2007 4:33 pm |
|
 |
Does anyone know how I might contact Ian? |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Fri May 25, 2007 5:02 am |
|
 |
lol, sorry... I'm just ridiculously busy and tired at the moment. I'll take a look at it now. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Fri May 25, 2007 5:14 am |
|
 |
hmm, the api certainly can do this... I'm just finding it difficult to see in exactly how. The documentation is very thin. I'll get back to you soon. |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Fri May 25, 2007 11:38 am |
|
 |
Thanks for responding Ian, really sorry to bug you about this. If you don't have time to work on the script anymore would it be ok to see if i can get someone else to finish it off? |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Sat May 26, 2007 11:00 pm |
|
 |
yeh go for it, fully public domain... no problem at all. |
|
Back to top |
|
Ian Jones member
Member # Joined: 01 Oct 2001 Posts: 1114 Location: Brisbane, QLD, Australia.
|
Posted: Mon May 28, 2007 4:57 am |
|
 |
Ok, I figured it out. Was just a matter of time.
Create a preset in illustrator called "dredd" and then run this script and it'll work. Alternatively open the script in notepad, edit the name "dredd" to some other preset and save it, making sure the extension remains .jsx
I would add a dialog to open a preset but I do not know how yet.
http://www.motionreactor.net/misc/Batch_Trace_Bitmap_SaveAsEPS.jsx |
|
Back to top |
|
iandredd member
Member # Joined: 04 Jul 2002 Posts: 178
|
Posted: Mon May 28, 2007 5:32 am |
|
 |
Thanks so much Ian! You have no idea how helpful this is for us . |
|
Back to top |
|
|