Skip to main content
Tom_Krcha
Participating Frequently
March 21, 2013
Question

Drawscript - turn Illustrator shapes into code

I've just launched a little extension for Illustrator I've been working on called Drawscript - http://drawscri.pt

It converts Illustrator shapes into code (Obj-C, C++, JavaScript, Processing, ActionScript 3, JSON, Bezier array).

It's great for skinning UIs, creating vector assets for gaming and learning/teaching vector graphics programming.

If you have any comments, found bugs, etc. Let me know here or on my Twitter, Facebook, Google+.

Thanks!

Tom

This topic is closed to new replies. Start a new post to keep the conversation going.

38 replies

Tom_Krcha
Tom_KrchaAuthor
Participating Frequently
May 2, 2013

Btw, I have posted several tutorials on my blog on how to begin with Drawscript together with different environments:

Translate
Participant
December 7, 2013

Tom,  are you still actively developing this tool?  It seems awfully quiet on the update/release front.  I wouldn't mind purchasing this tool if it had regular updates...  hint hint.

Translate
Known Participant
May 2, 2013

Hey Tom,

I am not using this to it's full potential admittedly, but I am finding it VERY useful.

Drawing in iOS/Core Graphics is new to me but using Illustrator isn't, so I am  using your extension to translate skills between between one 'language' and the other.

Its proven to be a quick way to learn how to use core graphics drawing API - using live example code :-)

Thank you !

Darren.

Translate
Tom_Krcha
Tom_KrchaAuthor
Participating Frequently
May 2, 2013

Thanks Darren, that's a great use case! Glad you like it.

Translate
Participant
April 23, 2013

Hi Tom,

I am seeing an issue where my final point (closing the shape) is not a BezierCurveTo where I would expect it (it gets rendered as a straight anchor point instead of a curved one -- bottom image).

I was able to get around this by making my curve points in the middle of the set, rather than the opening/closing point.

I'm looking forward to seeing this tool grow! Thanks for making it.

Translate
Tom_Krcha
Tom_KrchaAuthor
Participating Frequently
May 2, 2013

Hi, I am not able to reproduce this,

I did a quick test and it's fine, would you mind sending me your AI file?

Translate
Participant
May 2, 2013

I re-downloaded and installed Drawscript, and now I can't reproduce the issue either. So it's cool!

Translate
Participating Frequently
March 30, 2013

I am unable to get generate Javascript code.
Is there an issue with the generator and javascript?

Translate
Tom_Krcha
Tom_KrchaAuthor
Participating Frequently
March 31, 2013

@carrzkiss yes, there was an issue with Javascript, make sure you try the latest build. Thanks!

Translate
Participant
March 29, 2013

Hi,

Will this support Illustrator CS6 masks, too? If so, this could prove very useful over the long run.

Thanks,

Patrick

Translate
Tom_Krcha
Tom_KrchaAuthor
Participating Frequently
March 30, 2013

I need to look at it, but as of now, try to simplify structures as much as possible, because remember in order to support all the languages there are definitely some trade offs that you have to take.

Translate
Inspiring
March 30, 2013

Any updates concerning CS5/etc? Is the only thing keeping this working for CS5 the "HostList Version" in the "manifest.xml" ?

Translate
Inspiring
March 26, 2013

Tried it on a few old illustrator files of mine and noticed that 'Javacript Canvas' often seems to have problems.

  • Selected all objects: no output in Javascript Canvas window
  • Selected one brush stroke: no output. Selected another brush stroke made with the same brush: output
  • Selected a region: no output. Selected another region of strokes/objects: output
  • Shapes seem to work fine so I converted all brush strokes to fills: no output or it makes illustrator freeze with the 'rainbow' cursor
  • Drew 50 standard shapes like rectangles, circles, stars, selected them all: output
  • Drew 50 brush strokes all made with the same brush: no output
  • Converted those 50 brush strokes to fills as it seemed to have less problems with shapes: still no output

Other languages seem to have less problems, though sometimes it takes a while looking at the rainbow cursor. Standard shapes work the best and fastest. More complicated objects like brushes seem to give them more problems. For other languages it takes a while for them to give output. Javascript Canvas often don't give output on brush strokes at all. Also not when converting them to fills.

All things which are still worked on when the final version comes out?

Translate
Inspiring
March 22, 2013

Looks really nice. There are various other methods floating around for some of the individual options, but nice idea to have it all in one output process from within Illustrator. Makes for a much cleaner approach, good work.

I didn't find what versions of Illustrator this works with? Is this only for CS6? It failed to install on CS5.5 for me.

Is this another case of:

if (installedSoftware < CS6 || installedSoftware != Cloud) {

    abandonWare = true;

}

If so, then it seems quite odd since its just accessing and gathering path data why couldn't it then work in other versions other than CS6? Or am I mistaken that it does indeed work in other versions?

Translate
Tom_Krcha
Tom_KrchaAuthor
Participating Frequently
March 22, 2013

Hi W_J_T,

it's currently in Beta and first drop, I am looking into this to see if it could potentially support that case as well. It requires more testing and I think it might be possible. Currently it works on CS6 only.

Translate
Inspiring
March 22, 2013

Ok, sounds good, thanks for the response. Looking forward to further releases and seeing it for other installed versions of Illustrator. * If, you can get doing so past the powers to be that is. But technically it seems like it should be doable, one would think. Keep up the good work Tom, thanks again.

Translate
Mylenium
Legend
March 22, 2013

Any plans on adding support for After Effects keyframe and mask data or at least a raw export that outputs the positions as 3 component arrays [X,Y,Z]? This would make a nice workflow with that program... Gonna give this a whirl later today or on the weekend....

Mylenium

Translate
Tom_Krcha
Tom_KrchaAuthor
Participating Frequently
March 22, 2013

Good point, I need to look into that. Thanks for the feedback!

Can you send me more info on how exactly would you like to structure that data?

Translate