fixing an Illustrator bug: blend open paths with a spline

Illustrator has this annoying behavior where it only generates a spline for a blend if one or more of the paths being blended are closed. My working method is such that I almost never generate closed paths, so this is super annoying.

There is a simple workaround, but it is annoying to do: swear, undo the blend, close the first path, make the blend, open the first path. You would think the swearing is optional but in practice I find it to be mandatory.

Today I got annoyed enough at this behavior to write a script to do it for me.

blend with spline.jsx

Throw this in your Illustrator scripts directory, and assign a hotkey to it via whatever method you choose – I used Alfred to bind command-alt-shift-b to a ‘launch apps/files’ action, which is the key I used to have assigned to object>blend>make. Now blends Just Work for me.

(And maybe go upvote the relevant uservoice issue if this annoys you too, I’d really rather have this choice something switchable in Illustrator without this kludgy workaround.)

 


Also, huge thanks to Past Me for setting up a workspace in Nova that points to my collection of Illustrator scripts and lets me hit command-R to run what I’m working on in Illustrator, damn. I stuffed an alias to Illustrator’s Javascript docs in there too so that Future Me has absolutely everything she needs to hack up a script without going looking.

Illustrator Brush Munger

One thing I’ve wanted for a while in Illustrator is the ability to randomly choose brushes. I finally wrote a script to make it happen.

1
2
3
4

So now you can draw a bunch of paths in, say, a “dying marker” brush, then decide it looks too obviously fake, make a few more (“dying marker 2/3/4…”), and randomize them.

Or you might make a “lovely fir tree” brush, draw a bunch of lines with it, then decide you want some variety and make a “lovely spruce tree” and “lovely larch tree” brush as well, and randomize them as well. Though if you added a “lovely sycamore tree” brush, the amount of name difference you’d have to allow for that one would probably end up selecting from almost every brush you had in the document. That’s what undo is for. And temporary brush renamings.

If this feels like a thing you could use then grab it here and put it in the scripts directory of your copy of Illustrator. Enjoy!

hacking the tool

Woo. I finally got around to hacking up some keyboard shortcuts to change stroke weights in Illustrator. It is a horrible mess involving having Quicksilver trigger an Applescript when I hit command-option-control-[/] but it works – I mash the modifiers and hit [, and the size of my stroke decreases by 25%; modifier-mash plus ] increases it by a third. Which is close enough to the inverse of the decreasing to make me happy.

For further ugly hackery, I have bound the touch strip on my tablet to trigger those keys when I’m in Illustrator.

At some point in the future I might want to prettify the stroke weights it ends up with – a weight of 1.0002 points is not pretty – but for now I’m just going to enjoy actually being able to control this at small values without typing a number into the stroke palette. Which is a thing I find myself doing a hell of a lot when using art brushes.

Anyway, if you want ’em, download them here and have fun: Illustrator stroke width scripts

Illustrator script: Blend color swatches.

My first love in digital art was Deluxe Paint, way back in the late 80s and early 90s. The way it exposed the Amiga’s color model really shaped a lot of the way I still work; being able to tweak a “global” color swatch in Illustrator and have everything I drew in that swatch immediately change, the same way tweaking a palette register in DPaint worked, was the deciding factor in me choosing Illustrator over Painter or Photoshop when I switched to a Mac.

Lately I’ve been experimenting with returning to these roots in the way I manage my colors. A common workflow in DPaint was to pick a couple of colors at widely-spread points on the palette, then make DPaint fill in all the intervening palette registers with a smooth gradient between them. I’ve been simulating this workflow by making a couple of global swatches, then drawing a couple of boxes, using Illustrator’s blend tool to generate a series of shapes that have a color gradient, and eyedroppering all of those colors into the palette, then setting them to global swatches. But obviously that is a lot more steps than “select two colors, hit a button”. So I spent an hour and a half doing some scripting…

As the video notes, it only works on global CMYK swatches. If you work in RGB or spot swatches, you’ll have to tweak this some.

Download Blend Swatches.jsx and stick it in the presets/your_language/scripts directory, then invoke it with file->scripts, and enjoy. (You’ll have to quit and relaunch AI if it’s running before the script shows up in that menu.)