Retrobatch JavaScript API

As part of Retrobatch Pro 1.2, you can now write custom nodes using JavaScript and the Cocoa frameworks from Apple. This feature is considered a beta, and we're looking to collect feedback and ideas for it. If you run into problems or want to give feedback, make a post on our forum or send use an email: support@flyingmeat.com.

Warning

While 3rd party plug-in can be extremely useful, they can also be dangerous to your computer and files. Plug-ins have the ability to read, write, and even delete files on your computer. Plug-ins available from our samples page have been reviewed and are considered safe to use. The same can not be said for any plug-in downloaded from other locations on the Internet or linked to from our forums.

Sample Plug-Ins

You can download a number of sample plug-ins from our website. The source for these plug-ins are also available on GitHub.

Installing Plug-Ins

Installing a plug-in is easy. Simply download a plug-in, unzip it as necessary, and double click the File.retrobatchplugin. Retrobatch will then offer to install the plug-in for you.

The JavaScript Cocoa Bridge

While JavaScript is a powerful and expressive language, it doesn't have a whole lot of utility for integrating with MacOS or manipulating images. So we've included a "bridge" in Retrobatch, which allows JavaScript to load up and use classes and function from Apple's Cocoa and Core Graphics frameworks. This bridge is named "FMJS".

While JavaScript is a "safe" language, the bridge introduces a number of "unsafe" classes. What this means is, if you want to write a script that deletes all the files in your home folder, you have the power to do this. It also means that if you make a programming error and pass the wrong type of value to a Core Graphics function, Retrobatch is very likely going to crash. So care must be taken when dealing with low level MacOS functions.