Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
After Effects only understands basic JavaScript arrays as coordinates. It doesn't have draw primitives or any of that, so no fancies required. Just lines and lines of [X,Y,Z] will do. Also perhaps a simple CSV export? 3D programs like Cinema 4D can use that for shaping splines and polygons...
Mylenium
Copy link to clipboard
Copied
Tried it on a few old illustrator files of mine and noticed that 'Javacript Canvas' often seems to have problems.
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?
Copy link to clipboard
Copied
Hi,
Will this support Illustrator CS6 masks, too? If so, this could prove very useful over the long run.
Thanks,
Patrick
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Any updates concerning CS5/etc? Is the only thing keeping this working for CS5 the "HostList Version" in the "manifest.xml" ?
Copy link to clipboard
Copied
@W_J_T: I looked into that solution, but there is more to make it working on older versions. At least complete UI rewrite and other adjustments regarding missing APIs that were introduced in CS6.
Copy link to clipboard
Copied
Will this work with Illustrator CS4/CS5?
Copy link to clipboard
Copied
I am unable to get generate Javascript code.
Is there an issue with the generator and javascript?
Copy link to clipboard
Copied
@carrzkiss yes, there was an issue with Javascript, make sure you try the latest build. Thanks!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
I re-downloaded and installed Drawscript, and now I can't reproduce the issue either. So it's cool!
Copy link to clipboard
Copied
Hi All,
I'm drawing a rectangular house with rectangular windows.
DrawScript generated this JavaScript code for the house:
ctx.fillStyle="rgb(139,67,94)";
ctx.strokeStyle="rgb(0,0,0)";
ctx.lineWidth=4;
ctx.fillRect(79,255,458,342);
ctx.strokeRect(79,255,458,342);
ctx.fill();
ctx.stroke();
And similar code for the windows. But everything becomes black. Solution was to delete the ctx.fill() command. It is not needed. I think it is a bug.
best regards
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks Darren, that's a great use case! Glad you like it.
Copy link to clipboard
Copied
Btw, I have posted several tutorials on my blog on how to begin with Drawscript together with different environments:
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
hi
when I export from Illustrator to json format the coordinate x and y lose decimals, is it a bug ?
if no , are there another properties to setup when export ?
thanks
Copy link to clipboard
Copied
I LOVE this extension.
Is there any way to change the origin tho? Even when I adjust the origin with the ruler, the numbers come out relative the entire file. I have to export the paths to another file to get them to start at 0,0.