The Shape of Everything
A website mostly about Mac stuff, written by August "Gus" Mueller
» Acorn
» Retrobatch
» Mastodon
» Instagram
» Github
» Maybe Pizza?
» Archives
» Feed
» Micro feed
August 26, 2008
(This post is from my old, old, super old site. My views have changed over the years, hopefully my writing has improved, and there is now more than a handful of folks reading my site. Enjoy.)

I've had a "Ruby plugin enabler" for Acorn since before it was 1.0, but there was something going on with the RubyCocoa bridge which was causing Acorn to crash in weird ways. Obviously I kept it out of the spotlight because a crashing Acorn is a worthless Acorn. However, I saw an email today from the rubycocoa-devel list which said a patch was checked in to the project which sounded like it might have fixed the problem I had experienced.

Long story short, you can now write plugins for Acorn in the same manner that you could with Python, only with Ruby.

Here's how to use it. First, grab, unpack it, and place RubyPluginEnabler.acplugin in ~/Library/Application Support/Acorn/Plug-Ins/.

Next, grab an example Ruby script plugin, such as RubyGrayscale.rb. Save that in the Plug-Ins directory as well, make sure the file extension is .rb, and not something like .txt.

Restart Acorn, open up an image, and choose the "Ruby Convert to Grayscale" under the Plugins/Color menu.

Tada! It's obviously a really simple plugin, and this is the only ruby sample out there, but if you take a look at the Acorn Plugins page on the FM wiki, you'll see a handful of Python examples which should be trivial to port over.


In other news, did you know that all those great filters in Acorn can be manipulated visually? It's a pretty powerful feature, and one that is overlooked quite often. Here's a demo movie of me playing with a gradient filter, along with a bump distortion: acorn