Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions after-effects-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ fn main() {
return;
}

let ae_sdk_path = &env::var("AESDK_ROOT").ok().filter(|x| !x.is_empty()).expect(
"AESDK_ROOT environment variable not set – cannot find AfterEffects SDK.\n\
let ae_sdk_path = &env::var("AESDK_ROOT")
.ok()
.filter(|x| !x.is_empty())
.expect(
"AESDK_ROOT environment variable not set – cannot find AfterEffects SDK.\n\
Please set AESDK_ROOT to the root folder of your AfterEffects SDK\n\
installation (this folder contains the Examples folder & the SDK\n\
Guide PDF).",
);
);

if !Path::new(ae_sdk_path).exists() {
panic!("AESDK_ROOT environment variable points to non-existent path: {ae_sdk_path}");
Expand Down Expand Up @@ -109,9 +112,16 @@ fn main() {
// Let's just rewrite the bindings here and pretend it never happened
if let Ok(mut content) = std::fs::read_to_string(out_path.join("bindings.rs")) {
if content.contains("pub __bindgen_anon_1: PF_Point__bindgen_ty_1,") {
content = content.replace("pub __bindgen_anon_1: PF_Point__bindgen_ty_1,", "pub h: A_long,");
content = content.replace("pub __bindgen_anon_2: PF_Point__bindgen_ty_2,", "pub v: A_long,");
std::fs::write(out_path.join("bindings.rs"), content).expect("Couldn't rewrite AfterEffects bindings!");
content = content.replace(
"pub __bindgen_anon_1: PF_Point__bindgen_ty_1,",
"pub h: A_long,",
);
content = content.replace(
"pub __bindgen_anon_2: PF_Point__bindgen_ty_2,",
"pub v: A_long,",
);
std::fs::write(out_path.join("bindings.rs"), content)
.expect("Couldn't rewrite AfterEffects bindings!");
}
}
}
1 change: 0 additions & 1 deletion after-effects-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#![allow(unused_attributes)]

#![doc = include_str!("../README.md")]

// Included bindings are generated from After Effects SDK 25.6 dated Sep 2025
Expand Down
245 changes: 92 additions & 153 deletions after-effects/src/aegp/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::ae_sys;

use std::{ convert::TryFrom, ffi::CString, marker::PhantomData };
use std::{convert::TryFrom, ffi::CString, marker::PhantomData};
use widestring::U16CString;

#[cfg(feature = "artisan-2-api")]
Expand All @@ -9,184 +9,123 @@ mod scene_3d;
pub use scene_3d::*;

pub mod suites {
pub(crate) mod camera; pub use camera ::CameraSuite as Camera;
pub(crate) mod canvas; pub use canvas ::CanvasSuite as Canvas;
pub(crate) mod color_settings; pub use color_settings ::ColorSettingsSuite as ColorSettings;
pub(crate) mod command; pub use command ::CommandSuite as Command;
pub(crate) mod comp; pub use comp ::CompSuite as Comp;
pub(crate) mod composite; pub use composite ::CompositeSuite as Composite;
pub(crate) mod effect; pub use effect ::EffectSuite as Effect;
pub(crate) mod footage; pub use footage ::FootageSuite as Footage;
pub(crate) mod io_in; pub use io_in ::IOInSuite as IOIn;
pub(crate) mod item; pub use item ::ItemSuite as Item;
pub(crate) mod keyframe; pub use keyframe ::KeyframeSuite as Keyframe;
pub(crate) mod layer_render_options; pub use layer_render_options::LayerRenderOptionsSuite as LayerRenderOptions;
pub(crate) mod layer; pub use layer ::LayerSuite as Layer;
pub(crate) mod light; pub use light ::LightSuite as Light;
pub(crate) mod mask; pub use mask ::{ MaskSuite as Mask,
MaskOutlineSuite as MaskOutline };
pub(crate) mod memory; pub use memory ::MemorySuite as Memory;
pub(crate) mod persistent_data; pub use persistent_data ::PersistentDataSuite as PersistentData;
pub(crate) mod pf_interface; pub use pf_interface ::PFInterfaceSuite as PFInterface;
pub(crate) mod project; pub use project ::ProjectSuite as Project;
pub(crate) mod register; pub use register ::{ RegisterSuite as Register,
RegisterNonAegpSuite as RegisterNonAegp };
pub(crate) mod render_async_manager; pub use render_async_manager::RenderAsyncManagerSuite as RenderAsyncManager;
pub(crate) mod render_options; pub use render_options ::RenderOptionsSuite as RenderOptions;
pub(crate) mod render; pub use render ::RenderSuite as Render;
pub(crate) mod output_module; pub use output_module ::OutputModuleSuite as OutputModule;
pub(crate) mod render_queue; pub use render_queue ::RenderQueueSuite as RenderQueue;
pub(crate) mod render_queue_item; pub use render_queue_item ::RenderQueueItemSuite as RenderQueueItem;
pub(crate) mod sound_data; pub use sound_data ::SoundDataSuite as SoundData;
pub(crate) mod stream; pub use stream ::{ StreamSuite as Stream,
DynamicStreamSuite as DynamicStream };
pub(crate) mod utility; pub use utility ::UtilitySuite as Utility;
pub(crate) mod world; pub use world ::WorldSuite as World;
pub(crate) mod compute_cache; pub use compute_cache ::ComputeCacheSuite as ComputeCache;
pub(crate) mod hash; pub use hash ::HashSuite as Hash;
pub(crate) mod camera;
pub use camera::CameraSuite as Camera;
pub(crate) mod canvas;
pub use canvas::CanvasSuite as Canvas;
pub(crate) mod color_settings;
pub use color_settings::ColorSettingsSuite as ColorSettings;
pub(crate) mod command;
pub use command::CommandSuite as Command;
pub(crate) mod comp;
pub use comp::CompSuite as Comp;
pub(crate) mod composite;
pub use composite::CompositeSuite as Composite;
pub(crate) mod effect;
pub use effect::EffectSuite as Effect;
pub(crate) mod footage;
pub use footage::FootageSuite as Footage;
pub(crate) mod io_in;
pub use io_in::IOInSuite as IOIn;
pub(crate) mod item;
pub use item::ItemSuite as Item;
pub(crate) mod keyframe;
pub use keyframe::KeyframeSuite as Keyframe;
pub(crate) mod layer_render_options;
pub use layer_render_options::LayerRenderOptionsSuite as LayerRenderOptions;
pub(crate) mod layer;
pub use layer::LayerSuite as Layer;
pub(crate) mod light;
pub use light::LightSuite as Light;
pub(crate) mod mask;
pub use mask::{MaskOutlineSuite as MaskOutline, MaskSuite as Mask};
pub(crate) mod memory;
pub use memory::MemorySuite as Memory;
pub(crate) mod persistent_data;
pub use persistent_data::PersistentDataSuite as PersistentData;
pub(crate) mod pf_interface;
pub use pf_interface::PFInterfaceSuite as PFInterface;
pub(crate) mod project;
pub use project::ProjectSuite as Project;
pub(crate) mod register;
pub use register::{RegisterNonAegpSuite as RegisterNonAegp, RegisterSuite as Register};
pub(crate) mod render_async_manager;
pub use render_async_manager::RenderAsyncManagerSuite as RenderAsyncManager;
pub(crate) mod render_options;
pub use render_options::RenderOptionsSuite as RenderOptions;
pub(crate) mod render;
pub use render::RenderSuite as Render;
pub(crate) mod output_module;
pub use output_module::OutputModuleSuite as OutputModule;
pub(crate) mod render_queue;
pub use render_queue::RenderQueueSuite as RenderQueue;
pub(crate) mod render_queue_item;
pub use render_queue_item::RenderQueueItemSuite as RenderQueueItem;
pub(crate) mod sound_data;
pub use sound_data::SoundDataSuite as SoundData;
pub(crate) mod stream;
pub use stream::{DynamicStreamSuite as DynamicStream, StreamSuite as Stream};
pub(crate) mod utility;
pub use utility::UtilitySuite as Utility;
pub(crate) mod world;
pub use world::WorldSuite as World;
pub(crate) mod compute_cache;
pub use compute_cache::ComputeCacheSuite as ComputeCache;
pub(crate) mod hash;
pub use hash::HashSuite as Hash;
}

pub type PluginId = ae_sys::AEGP_PluginID;
pub type ItemId = i32;
pub type LayerId = u32;

pub use suites::command::{MenuId, MenuOrder};
pub use suites::register::{HookPriority, CommandHookStatus};
pub use suites::project::{
ProjectHandle,
ProjectBitDepth,
};
pub use suites::camera::{
Camera,
CameraType,
FilmSizeUnits,
};
pub use suites::camera::{Camera, CameraType, FilmSizeUnits};
pub use suites::canvas::{
Canvas,
BinType,
DisplayChannel,
RenderHints,
RenderLayerContextHandle,
RenderNumEffects,
RenderReceiptHandle,
RenderReceiptStatus,
};
pub use suites::color_settings::{
ColorProfileHandle,
ConstColorProfileHandle,
ItemViewHandle,
};
pub use suites::comp::{
Composition,
Collection2Handle,
CompFlags,
CompHandle,
};
pub use suites::compute_cache:: {
ComputeClassId
};
pub use suites::effect::{
Effect,
EffectFlags,
EffectRefHandle,
InstalledEffectKey,
BinType, Canvas, DisplayChannel, RenderHints, RenderLayerContextHandle, RenderNumEffects,
RenderReceiptHandle, RenderReceiptStatus,
};
pub use suites::color_settings::{ColorProfileHandle, ConstColorProfileHandle, ItemViewHandle};
pub use suites::command::{MenuId, MenuOrder};
pub use suites::comp::{Collection2Handle, CompFlags, CompHandle, Composition};
pub use suites::compute_cache::ComputeClassId;
pub use suites::effect::{Effect, EffectFlags, EffectRefHandle, InstalledEffectKey};
pub use suites::footage::{
Footage,
FootageHandle,
FootageSignature,
InterpretationStyle,
Platform,
Footage, FootageHandle, FootageSignature, InterpretationStyle, Platform,
};
pub use suites::hash::Guid;
pub use suites::io_in::InputSpecification;
pub use suites::item::{
Item,
ItemFlags,
ItemHandle,
ItemType,
LabelId,
};
pub use suites::item::{Item, ItemFlags, ItemHandle, ItemType, LabelId};
pub use suites::keyframe::{
AddKeyframesInfoHandle, KeyframeFlags, KeyframeInterpolation, KeyframeInterpolationMask,
Keyframes,
AddKeyframesInfoHandle,
KeyframeFlags,
KeyframeInterpolation,
KeyframeInterpolationMask,
};
pub use suites::layer_render_options::{
LayerRenderOptions,
LayerRenderOptionsHandle,
MatteMode
};
pub use suites::layer::{
Layer,
LayerFlags,
LayerHandle,
LayerQuality,
LayerSamplingQuality,
ObjectType,
TimeMode,
Layer, LayerFlags, LayerHandle, LayerQuality, LayerSamplingQuality, ObjectType, TimeMode,
TrackMatte,
};
pub use suites::layer_render_options::{LayerRenderOptions, LayerRenderOptionsHandle, MatteMode};
pub use suites::light::LightType;
pub use suites::mask::{
Mask,
MaskOutline,
MaskFeatherFalloff,
MaskFeatherInterp,
MaskFeatherType,
MaskMBlur,
MaskMode,
MaskOutlineHandle,
MaskRefHandle,
};
pub use suites::memory::{
MemHandle,
MemHandleLock,
};
pub use suites::persistent_data::{
PersistentType,
PersistentBlobHandle
};
pub use suites::render_async_manager::AsyncManager;
pub use suites::render_options::{
RenderOptions,
RenderOptionsHandle,
ItemQuality,
ChannelOrder
Mask, MaskFeatherFalloff, MaskFeatherInterp, MaskFeatherType, MaskMBlur, MaskMode, MaskOutline,
MaskOutlineHandle, MaskRefHandle,
};
pub use suites::memory::{MemHandle, MemHandleLock};
pub use suites::output_module::{
EmbeddingType,
OutputTypes,
PostRenderAction,
StretchQuality,
VideoChannels,
EmbeddingType, OutputTypes, PostRenderAction, StretchQuality, VideoChannels,
};
pub use suites::persistent_data::{PersistentBlobHandle, PersistentType};
pub use suites::project::{ProjectBitDepth, ProjectHandle};
pub use suites::register::{CommandHookStatus, HookPriority};
pub use suites::render_async_manager::AsyncManager;
pub use suites::render_options::{ChannelOrder, ItemQuality, RenderOptions, RenderOptionsHandle};
pub use suites::render_queue::RenderQueueState;
pub use suites::render_queue_item::{
LogType,
OutputModuleRefHandle,
RenderItemStatus,
RQItemRefHandle,
LogType, OutputModuleRefHandle, RQItemRefHandle, RenderItemStatus,
};
pub use suites::sound_data::SoundDataHandle;
pub use suites::stream::{
Stream,
DynamicStreamFlags,
LayerStream,
MaskStream,
StreamFlags,
StreamGroupingType,
StreamReferenceHandle,
StreamType,
StreamValue,
TextDocumentHandle,
DynamicStreamFlags, LayerStream, MaskStream, Stream, StreamFlags, StreamGroupingType,
StreamReferenceHandle, StreamType, StreamValue, TextDocumentHandle,
};
pub use suites::utility::GetPathTypes;
pub use suites::world::{
PlatformWorldHandle,
World,
WorldHandle,
WorldType,
};
pub use suites::hash::Guid;
pub use suites::world::{PlatformWorldHandle, World, WorldHandle, WorldType};
14 changes: 4 additions & 10 deletions after-effects/src/aegp/scene_3d.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{ae_sys, borrow_pica_basic_as_ptr, pr, Error, Matrix4, Suite, Time, WorldHandle};
use crate::{Error, Matrix4, Suite, Time, WorldHandle, ae_sys, borrow_pica_basic_as_ptr, pr};

// TDOO: finish wrapping the entire scene 3d

Expand Down Expand Up @@ -62,14 +62,10 @@ impl Scene3D {
}

#[inline]
pub fn scene3d_ptr(&self) -> *mut ae_sys::AEGP_Scene3D {
self.scene3d_ptr
}
pub fn scene3d_ptr(&self) -> *mut ae_sys::AEGP_Scene3D { self.scene3d_ptr }

#[inline]
pub fn scene3d_suite_ptr(&self) -> *const ae_sys::AEGP_Scene3DSuite2 {
self
}
pub fn scene3d_suite_ptr(&self) -> *const ae_sys::AEGP_Scene3DSuite2 { self }

#[inline]
pub fn setup_motion_blur_samples(
Expand Down Expand Up @@ -243,9 +239,7 @@ impl Scene3DLayerHandle {
}

#[inline]
pub fn as_ptr(&self) -> *const ae_sys::AEGP_Scene3DLayer {
self.scene3d_layer_ptr
}
pub fn as_ptr(&self) -> *const ae_sys::AEGP_Scene3DLayer { self.scene3d_layer_ptr }
}

pub struct Scene3DTextureCacheHandle {
Expand Down
Loading
Loading