API vs Accessibility

I’m developing a small macOS workflow utility for Final Cut Pro and I’d like to confirm whether there is a supported API for a particular project-management workflow before relying on macOS Accessibility automation.

The utility is intended to take an existing Final Cut Pro project and create multiple native duplicates at different custom frame sizes — for example:

  • 1920 × 1080
  • 1080 × 1920
  • 1080 × 1350
  • 1080 × 1080
  • custom banner dimensions

The desired operation is essentially the equivalent of Final Cut Pro’s Duplicate Project As… command: duplicate the selected project, assign a new name, set a custom video resolution, and optionally enable or disable Smart Conform.

It is important that Final Cut Pro itself performs a native project duplication so that all existing project data is retained, including effects, grades, plug-ins, keyframes, compound clips, retiming and Magnetic Masks.

I initially prototyped the workflow using FCPXML, which works very well for creating the differently sized projects. However, Apple’s documentation notes that Magnetic Masks are not included in XML exports, so an FCPXML round-trip is not suitable for this use case.

I’ve reviewed the documentation for FCPXML, Workflow Extensions / ProExtensionHost, and programmatic communication with Final Cut Pro using Apple Events, but I haven’t found a documented API that allows an application to:

  1. Duplicate the currently selected Final Cut Pro project natively.
  2. Rename the duplicated project.
  3. Change its video format to an arbitrary custom width and height.
  4. Optionally control Smart Conform.

I currently have a working proof of concept using the macOS Accessibility API to invoke and operate Final Cut Pro’s native Duplicate Project As… interface. Before developing that approach further, I’d like to confirm that I’m not overlooking a supported Final Cut Pro API or Workflow Extension capability that would accomplish the same thing more directly and robustly.

Is there a supported public API for this workflow, either through the Workflow Extension SDK, ProExtensionHost, Apple Events, scripting support, or another Professional Video Applications framework?

If not, is using macOS Accessibility to automate Final Cut Pro’s native project-duplication interface an appropriate approach for a third-party macOS workflow utility?

Many thanks,

James

API vs Accessibility
 
 
Q