after-effects-sys

Auto-generated After Effectsยฎ bindings


Keywords
plugins, graphics, motion-graphics, after-effects
Licenses
Apache-2.0/BSD-3-Clause/MIT/Zlib

Documentation

Rust Bindings for Adobe AfterEffectsยฎ & Premiere Proยฎ SDKs

High level bindings for the Adobe AfterEffectsยฎ (Ae) and Adobe Premiere Proยฎ SDKs.

This wraps many of the API suites in the Ae and Pr SDK and exposes them in safe Rust.

It also defines a set of macros that implement all the plugin boilerplate for you, so you can focus just on your actual plugin implementation.

Building the plugins is done entirely with Rust โ€“ there's no need to use any external programs or dependencies.

Packaging of the final plugin is done using a just script. Install with cargo install just and download AdobePlugin.just and put it next to your Cargo.toml.

Adobe plugins contain a special resource describing the plugin called PiPL. This repository includes a PiPL tool written in Rust which generates the needed resource in build.rs.

Pre-generated SDK bindings are included, so you can compile the final plugin by just running just release, and it works on both macOS and Windows.

You can also re-generate the bindings by downloading the SDK headers from Adobe and setting AESDK_ROOT and/or PRSDK_ROOT environment variables.

Using

Add after-effects or premiere to your dependencies and pipl to your dev-dependencies.

cargo add after-effects
cargo add --dev pipl

After Effects vs. Premiere

Adobe plugins are shared between After Effects and Premiere.

The main engine is based on After Effects, but Premiere loads most of the Ae plugins. While they have many common parts, there are some areas that are separated.

  • Premiere is missing all AEGP suites.

  • Premiere uses only software rendering, even if the Ae plugin supports GPU render and Smart Render.

  • Premiere has a separate entry point for GPU rendering, which can be defined using the premiere::define_gpu_filter! macro.

  • After Effects and Premiere also have some separate areas that are implemented independently.

  • You can't write a video filter plugin using only the Premiere SDK, the base engine is using Ae SDK.

Getting Started

Examples

A few basic examples are included in the repository. For more advanced use cases, refer to the C/C++ examples from the SDK.

For a more advanced sample with full GPU rendering you can check out the Gyroflow plugin

Development

When developing your plugin it's best to use the debug build - it will catch and display panics for you and it will log any messages and stack traces to DbgView (on Windows) or Console (on macOS). This is done by running just build.

The release version can be built using just release

Some plugins may be slow in debug build, in this case you can add optimizations to the debug build by using

[profile.dev]
opt-level = 3

or add debug symbols to your release build by using

[profile.release]
debug = true
debug-assertions = true

in your Cargo.toml file.

The release build doesn't catch panics by default to not add any additional overhead. You can opt-in for the panic handler by enabling catch-panics cargo feature:

features = ["catch-panics"]

Help Wanted/To Do

  • If you need a suite that's not yet wrapped, feel free to create a PR wrapping that suite.

  • Examples and documentation.

  • Better error handling. Possibly using color-eyre?

Using the Adobe SDK C++ Headers

Download the Adobe After Effects SDK.

โš ๏ธ The SDK published by Adobe is outdated if you are using the 3D Artisan API to write your own 3D renderer plug-in. Also see Features below for more information.

Ignore this if you just want to develop 2D plugins (which still have access to 3D data).

Define the AESDK_ROOT environment variable that contains the path to your Ae SDK. Typically the directory structure will look like this:

AfterEffectsSDK
โ”œโ”€โ”€ After_Effects_SDK_Guide.pdf
โ”œโ”€โ”€ Examples
    โ”œโ”€โ”€ AEGP
    โ”œโ”€โ”€ Effect
    โ”œโ”€โ”€ ...

Wrapped Suites

After Effects

AEGP PF DRAWBOT Other
๐Ÿ”ณ Artisan Util โœ… AE Adv App โœ… Draw โœ… AE Plugin Helper
โœ… Camera โœ… AE Adv Item โœ… Image โœ… AE Plugin Helper 2
โœ… Canvas ๐Ÿ”ณ AE Adv Time โœ… Path
๐Ÿ”ณ Collection โœ… AE App โœ… Pen
๐Ÿ”ณ Command โœ… AngleParam โœ… Supplier
โœ… Comp ๐Ÿ”ณ ANSI โœ… Surface
โœ… Composite โœ… Background Frame
๐Ÿ”ณ Compute ๐Ÿ”ณ Batch Sampling
โœ… Dynamic Stream โœ… Cache On Load
โœ… Effect โœ… Channel
๐Ÿ”ณ File Import Manager โœ… Color Settings
โœ… Footage โœ… Color Callbacks
๐Ÿ”ณ Hash โœ… Color Callbacks 16
โœ… IO In โœ… Color Callbacks Float
๐Ÿ”ณ IO Out โœ… ColorParam
โœ… Item โœ… Effect Custom UI
๐Ÿ”ณ Item View โœ… Effect Custom UI Overlay Theme
๐Ÿ”ณ Iterate โœ… Effect Sequence Data
โœ… Keyframe โœ… Effect UI
๐Ÿ”ณ Layer Mask โœ… Fill Matte
โœ… Layer Render Options โœ… GPU Device
โœ… Layer โœ… Handle
โœ… Light โœ… Iterate8
๐Ÿ”ณ Marker โœ… iterate16
โœ… Mask Outline โœ… iterateFloat
โœ… Mask โœ… Param Utils
๐Ÿ”ณ Math ๐Ÿ”ณ Path Data
โœ… Memory ๐Ÿ”ณ Path Query
๐Ÿ”ณ Output Module โœ… Pixel Data
๐Ÿ”ณ Persistent Data โœ… Pixel Format
โœ… PF Interface โœ… PointParam
โœ… Proj ๐Ÿ”ณ Sampling8
๐Ÿ”ณ QueryXform ๐Ÿ”ณ Sampling16
๐Ÿ”ณ Register ๐Ÿ”ณ SamplingFloat
โœ… Render Asyc Manager โœ… Source Settings
โœ… Render Options โœ… Transition
๐Ÿ”ณ Render Queue Item โœ… Utility
๐Ÿ”ณ Render Queue โœ… World
โœ… Render โœ… World Transform
๐Ÿ”ณ RenderQueue Monitor
โœ… Sound Data
โœ… Stream
๐Ÿ”ณ Text Document
๐Ÿ”ณ Text Layer
๐Ÿ”ณ Tracker
๐Ÿ”ณ Tracker Utility
โœ… Utility
๐Ÿ”ณ Workspace Panel
โœ… World

Premiere

Premiere MediaCore Control Surface Other
๐Ÿ”ณ Audio ๐Ÿ”ณ Accelerated Render Invocation ๐Ÿ”ณ ControlSurface โœ… PF Background Frame
๐Ÿ”ณ Clip Render ๐Ÿ”ณ App Info ๐Ÿ”ณ ControlSurface Command โœ… PF Cache On Load
๐Ÿ”ณ Deferred Processing ๐Ÿ”ณ Application Settings ๐Ÿ”ณ ControlSurface Lumetri โœ… PF Pixel Format
๐Ÿ”ณ Error ๐Ÿ”ณ Async File Reader ๐Ÿ”ณ ControlSurface Marker โœ… PF Source Settings
๐Ÿ”ณ Export Audio Param ๐Ÿ”ณ Async Operation ๐Ÿ”ณ ControlSurface Mixer โœ… PF Transition
๐Ÿ”ณ Export Standard Param ๐Ÿ”ณ Export File ๐Ÿ”ณ ControlSurface Transport โœ… PF Utility
๐Ÿ”ณ ExportController ๐Ÿ”ณ Export Info ๐Ÿ”ณ ControlSurfaceHost โœ… Opaque Effect Data
๐Ÿ”ณ File Registration ๐Ÿ”ณ Export Param ๐Ÿ”ณ ControlSurfaceHost Command ๐Ÿ”ณ Captioning
๐Ÿ”ณ Image Processing ๐Ÿ”ณ Export Progress ๐Ÿ”ณ ControlSurfaceHost Lumetri ๐Ÿ”ณ Effect Stream Label
๐Ÿ”ณ Legacy ๐Ÿ”ณ Exporter Utility ๐Ÿ”ณ ControlSurfaceHost Marker ๐Ÿ”ณ FlashCueMarkerData
๐Ÿ”ณ Media Accelerator โœ… GPU Device ๐Ÿ”ณ ControlSurfaceHost Mixer ๐Ÿ”ณ Importer File Manager
โœ… Memory Manager โœ… GPU Image Processing ๐Ÿ”ณ ControlSurfaceHost Transport ๐Ÿ”ณ Marker
๐Ÿ”ณ Palette ๐Ÿ”ณ Playmod Immersive Video ๐Ÿ”ณ ControlSurfacePlugin
๐Ÿ”ณ Pixel Format ๐Ÿ”ณ Playmod Overlay ๐Ÿ”ณ String
๐Ÿ”ณ Playmod Audio ๐Ÿ”ณ Sequence Audio
๐Ÿ”ณ Playmod Device Control โœ… Sequence Info
โœ… PPix ๐Ÿ”ณ Sequence Render
โœ… PPix 2 ๐Ÿ”ณ Smart Rendering
๐Ÿ”ณ PPix Cache ๐Ÿ”ณ String
๐Ÿ”ณ PPix Creator ๐Ÿ”ณ Transmit Invocation
๐Ÿ”ณ PPix Creator 2 โœ… Video Segment
๐Ÿ”ณ RollCrawl ๐Ÿ”ณ Video Segment Render
๐Ÿ”ณ Threaded Work
โœ… Time
๐Ÿ”ณ Window

License

Apache-2.0 OR BSD-3-Clause OR MIT OR Zlib at your option.