Skip to content

データ型

After Effects では、可能な限り、不透明なデータ型のプラグインを提供し、プラグインを操作するためのアクセサー関数を提供します。たとえば、ビデオ フレームは、不透明な AEGP_WorldH を使用して表現されます。場合によっては、基礎となる構造を単純に変更する方が効率的である場合もありますが、データ型の不透明性を維持することで、プラグインを再コンパイル (および再配布) せずに実装を変更できるようになります。


TypeDescribesManage Using
AEGP_MemHandleThis structure contains more than just the referenced memory. So it should not be dereferenced directly.

Use AEGP_LockMemHandle in the AEGP Memory Suite to get a pointer to the memory referenced by the AEGP_MemHandle. And of course, unlock it when you’re done.
AEGP Memory Suite
AEGP_ProjectHThe current After Effects project. Projects are a set of elements arranged hierarchically in a tree to preserve semantic relationships.

Interior nodes of the tree are folders.

As of CS6, there will only ever be one open project.
AEGP Project Suite
AEGP_ItemHAn abstraction describing any element of a project, including folders. An item is anything that can be selected.

Since multiple object types can be selected, we treat them as AEGP_ItemHs until more specificity is required.
AEGP Item Suite
AEGP_Collection2HA set of selected items.AEGP Collection Suite
AEGP_CompHA composition is a sequence of renderable items that, together, produce output.

A composition exists over a time interval.

Multiple compositions can exist within one project.
AEGP Composition Suite
AEGP_FootageHAn item that can be rendered. Folders and compositions are the only items that are not footage.AEGP Footage Suite
AEGP_LayerHAn element of a composition. Layers are rendered in sequence, which allows for occlusions.

Solids, text, paint, cameras, lights, images, and image sequences are all represented as layers.

Layers may be defined over sub-intervals of the composition’s time interval.
AEGP Layer Suite
AEGP_WorldHA frame of pixels.AEGP World Suite
AEGP_EffectRefHAn effect applied to a layer. An effect is a function that takes as its argument a layer (and possibly other parameters) and returns an altered version of the layer for rendering.AEGP Effect Suite
AEGP_StreamRefHAny parameter stream attached to a layer, in a composition.

See the description of AEGP_GetNewLayerStream from AEGP_StreamSuite5 for a full list of stream types.
AEGP Stream Suite,
AEGP Dynamic Stream Suite,
AEGP Keyframe Suite
AEGP_MaskRefHA mask applied to a layer. An AEGP_MaskRefH is used to access details about the mask stream, not the specific points which constitute the mask.

A mask is a rasterized path (sequence of vertices) that partitions a layer into two pieces, allowing each to be rendered differently.
AEGP Mask Suite
AEGP_MaskOutlineValHThe specific points which constitute the mask.

The points in a mask outline are ordered, and the mask need not be closed.
AEGP Mask Outline Suite
AEGP_TextDocumentHRepresents the actual text associated with a text layer.AEGP Text Document Suite
AEGP_TextOutlinesHA reference to all the paths that make up the outlines of a given text layer.AEGP Text Layer Suite
AEGP_MarkerValThe data associated with a given timeline marker.AEGP Marker Suite
AEGP_PersistentBlobHA “blob” of data containing the current preferences.AEGP Persistent Data Suite
AEGP_RenderOptionsHThe settings associated with a render request.AEGP Render Options Suite
AEGP_LayerRenderOptionsHThe settings associated with a layer render request.AEGP Layer Render Options Suite
AEGP_FrameReceiptHA reference to a rendered frame.AEGP Render Suite
AEGP_RQItemRefHAn item in the render queue.AEGP Render Queue Suite,
AEGP Render Queue Item Suite
AEGP_OutputModuleRefHAn output module, attached to a specific AEGP_RQItemRef in the render queue.AEGP Output Module Suite
AEGP_SoundDataHThe audio settings used for a given layer.AEGP Sound Data Suite
AEGP_RenderLayerContextHState information at the time of a render request, sent to an Artisan by After Effects.AEGP Canvas Suite
AEGP_RenderReceiptHUsed by Artisans when rendering.AEGP Canvas Suite

Information about layers, streams, and many other items doesn’t survive long; it’s often invalidated by user activity.

Anything that modifies the quantity (not quality) of items will invalidate references to those items; adding a keyframe to a stream invalidates references to that stream, but forcing a layer to be rendered doesn’t invalidate references to it. Do not cache layer pixels.

Caching references between calls to a specific hook function within your plug-in is not recommended; acquire information when you need it, and forget (release) it as soon as possible.


Were You Just Going To Leave That Data Lying Around?

Section titled “Were You Just Going To Leave That Data Lying Around?”

When you ask After Effects to populate and return handles to data structures, it’s important that you clean up after yourself. For the following data types, you must call the appropriate disposal routines.


Data TypeDisposal Function
AEGP_Collection2HAEGP_DisposeCollection, from AEGP_CollectionSuite2
AEGP_FootageHAEGP_DisposeFootage, from AEGP_FootageSuite5
AEGP_WorldHAEGP_Dispose, from AEGP_WorldSuite3
(Or AEGP_DisposeTexture, from AEGP_CanvasSuite8, if layer texture created using AEGP_RenderTexture)
AEGP_EffectRefHAEGP_DisposeEffect, from AEGP_EffectSuite4
AEGP_MaskRefHAEGP_DisposeMask, from AEGP_MaskSuite6
AEGP_RenderOptionsHAEGP_Dispose, from AEGP_RenderQueueMonitorSuite1
AEGP_LayerRenderOptionsHAEGP_Dispose, from AEGP_LayerRenderOptionsSuite1
AEGP_RenderReceiptHAEGP_DisposeRenderReceipt, from AEGP_CanvasSuite8