Screenshot of a filter being applied to an image in Apple Motion

Students could soon learn programming by writing Final Cut plug-ins in Swift

Once you can write plug-ins for Final Cut Pro in Swift, making tools to extend Final Cut will be a worthwhile project for those learning programming.

I like to call the tools I make for Final Cut ‘plug-ins’ because from a user point of view they are small pieces of code that add features to Final Cut Pro. I don’t use traditional programming to make them. I use Motion, Apple’s $49 real-time motion graphics application. I combine the features and filters of Motion to make templates for Final Cut Pro. If I can’t do something in Motion, I can’t make it happen in Final Cut Pro.

What developers like to call ‘real’ plug-ins for applications are made using Xcode and written in Objective-C. They add new features to Motion. These new features are made available in Final Cut using a Motion template.

The software development kit that developers use to build these sort of plug-ins is called FxPlug.

A new version of FxPlug – version 4 – was introduced in October 2019 last year.

FxPlug 4 introduces fully ‘out-of-process‘ FxPlug plug-ins, which have no component that runs inside of the host application process. Out-of-process plug-ins provide improved security for end users and allow plug-in developers the freedom to choose from a variety of rendering technologies, such as OpenGL, Core Graphics, Core Image, or Metal to develop unique plug-ins that include on-screen controls and custom user interface elements—all running seamlessly in the host application. Plug-in developers can choose to implement in either Swift or Objective-C.

FxPlug 4 means developers can use Metal for rendering for the first time and can be written using Apple’s Swift programming language.

Version 4 is good news for developers who want to make new plug-ins that faster (that render using Metal) and more secure (because they are more reliable, so need less support).

Education: finding worthwhile projects

In recent years, Apple has focussed on helping educators teach programming using their Swift language. They provide all sorts of resources and tools to advance the cause of development worldwide.

One of the tough parts of teaching programming is to find simple enough projects that are based on small parts of a programming language, yet advanced enough to be inspirational to students.

There’s a big leap from getting your computer to display ‘hello world’ to getting it do something that someone would find useful on a day to day basis. The tough part is including all the elements that make a program work as a Mac, iPad or iPhone application. A tool to use every once in a while or to share with others.

The advantage of making a plug-in is that the ‘host’ application does a lot of the work to make the tool useful. It provides menus, windows, media, timelines and user interface elements.

Motion as a plug-in development playground

That’s why I hope that to establish this new version of the FxPlug SDK, Apple will develop educational resources so that new programmers will be able to learn Swift programming by making plug-ins for Motion. Plug-ins that add features to Motion to make templates for Final Cut Pro.

New developers would be even more encouraged to learn if new versions of iMovie for Mac, iPad and iPhone are able to use Motion templates that include FxPlug plug-ins. Having a potential audience (or market) of tens of millions of editors would be a big incentive to learn!

10th January 2020

The Final Cut Pro & Motion event you haven’t heard of

25th August 2020

All you need to know about Final Cut Pro 10.4.9 – improvements in many areas