Artisan Data Types¶
Below are the data types most commonly used in the Artisan API.
Data Types Used In The Artisan API¶
Type |
Describes |
---|---|
|
State information at the time of a render request, sent to an Artisan by After Effects. |
|
A collection of settings defining what is to be rendered, and how. |
|
The audio settings used for a given layer. |
|
Used by Artisans when rendering. |
|
A frame of pixels. |
|
The settings associated with a render queue item. |
Horz? Vert?¶
After Effects’ matrix is row based; OpenGL’s is column based. This means more work for you. Yay, billable hours!
Implementation And Design¶
An Artisan is nearly an application unto itself. Because we realized early in the After Effects 5.0 that there are many ways to approach the problems inherent in 3D rendering; intersections and shading, for example.
We provided an API with which we and third parties (yes, we really do use our own APIs) could implement any 3D rendering scheme desired.
3D Compositing, Not Modeling¶
After Effects is not a 3D modeling application. Users work in a responsive mode, switching to higher quality only at for proofing or final output. Consider providing at least two quality modes, one for layout and another for final output. Be conscious of render time in low quality mode.
Registering An Artisan¶
An Artisan is an AEGP, and has a single entry point. Artisans must also register their own function entry points and have a special callback for this purpose. See AEGP_RegisterArtisan()
from AEGP_RegisterSuites5.
This tables shows the functions that Artisans can support as defined by PR_ArtisanEntryPoints
: only render_func
is required.
Artisan Entry Points¶
PR_ArtisanEntryPoints |
|
---|---|
|
Called only once, right after PR_GlobalSetupFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_GlobalDataH *global_dataPH);
|
|
Dispose of any global data you allocated. PR_GlobalSetdownFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_GlobalDataH global_dataH);
|
|
Tell the world about yourself! Use PR_GlobalDoAboutFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_GlobalDataH global_dataH);
|
|
Allocate and instantiate any data specific to this instance of your Artisan. PR_InstanceSetupFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH,
PR_GlobalDataH global_dataH,
PR_InstanceFlags flags,
PR_FlatHandle flat_dataH0,
PR_InstanceDataH *instance_dataPH);
|
|
Deallocate and free any data specific to this instance of your Artisan. PR_InstanceSetdownFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH,
PR_GlobalDataH global_dataH,
PR_InstanceDataH instance_dataH);
|
|
Flatten your data in preparation to being written to disk. (making sure it’s OS independent, if your Artisan is). PR_FlattenInstanceFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH,
PR_GlobalDataH global_dataH,
PR_InstanceDataH instance_dataH,
PR_FlatHandle *flatH);
|
|
If your Artisan has a additional parameters (accessed through its Options dialog), this function will be called to get and set them. PR_DoInstanceDialogFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH,
PR_GlobalDataH global_dataH,
PR_InstanceDataH instance_dataH,
PR_DialogResult *resultP);
|
|
Perform any setup necessary to render a frame (called immediately before rendering). PR_FrameSetupFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH
PR_RenderContextH render_contextH,
PR_GlobalDataH global_dataH,
PR_InstanceDataH instance_dataH,
PR_RenderDataH *render_dataPH);
|
|
Dispose of any setup data allocated during PR_FrameSetdownFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH
PR_RenderContextH render_contextH,
PR_GlobalDataH global_dataH,
PR_InstanceDataH instance_dataH,
PR_RenderDataH render_dataH);
|
|
Render the scene. PR_FrameRenderFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH
PR_RenderContextH render_contextH,
PR_GlobalDataH global_dataH,
PR_InstanceDataH instance_dataH,
PR_RenderDataH render_dataH);
|
|
Artisans can draw their own projection axes, should the need arise. After Effects will call this function to obtain the transform between the composition world and those axes, as well as for a number of other functions related to on- and off-screen preview drawing (the former is relevant only to interactive artisans). PR_QueryFunc(
const PR_InData *in_dataP,
PR_GlobalContextH global_contextH,
PR_InstanceContextH instance_contextH
PR_QueryContextH query_contextH,
PR_QueryType query_type,
PR_GlobalDataH global_dataH,
PR_InstanceDataH instance_dataH);
New in CS6. |
The World Is Your Canvas¶
AEGP_RenderTexture()
supplies the raw pixels of a layer, untransformed, into an arbitrarily-sized buffer.
AEGP_RenderLayer()
invokes the entire After Effects render pipeline, including transforms, masking, et cetera, providing the layer as it appears in its composition, in a composition-sized buffer.
If the layer being rendered is 3D, the default (Standard 3D) Artisan is invoked to perform any 3D geometrics.
Your Artisan can use this to render track matte layers, and apply them only in a strictly 2D sense, to the transformed 3D layer.
Before rendering, the Artisans that ship with After Effects apply an inverse transform to get square pixels, then re-apply the transform before display.
For example, if the pixel aspect ratio is 10/11 (DV NTSC), we multiply by 11/10 to get square pixels. We process and composite 3D layers, then re-divide to get back to the original pixel aspect ratio.
The following suite supplies the layers, compositions, texture and destination buffers. This is a vital suite for all artisans.
AEGP_CanvasSuite8¶
Function |
Purpose |
---|---|
|
Given the render context provided to the Artisan at render time, returns a handle to the composition. AEGP_GetCompToRender(
PR_RenderContextH render_contextH,
AEGP_CompH *compPH)
|
|
Given the render context, returns the number of layers the Artisan needs to render. AEGP_GetNumLayersToRender(
PR_RenderContextH render_contextH,
A_long *num_to_renderPL)
|
|
Used to build a list of layers to render after determining the total number of layers that need rendering by the Artisan. AEGP_GetNthLayerContextToRender(
PR_RenderContextH render_contextH,
A_long n,
AEGP_RenderLayerContextH *layer_indexPH)
|
|
Given a AEGP_GetLayerFromLayerContext(
const PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
AEGP_LayerH *layerPH);
|
|
Allows for rendering of sub-layers (as within a Photoshop file). AEGP_GetLayerAndSubLayerFromLayerContext(
const PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
AEGP_LayerH *layerPH,
AEGP_SubLayerIndex *sublayerP);
|
|
With collapsed geometrics “on” this gives the layer in the root composition containing the layer context. With collapsed geometrics off this is the same as AEGP_GetTopLayerFromLayerContext(
const PR_RenderContextH r_contextH,
AEGP_RenderLayerContextH l_contextH,
AEGP_LayerH *layerPH);
|
|
Given the render context, returns the current point in (composition) time to render. AEGP_GetNthLayerIndexToRender(
PR_RenderContextH render_contextH,
A_long *time,
A_long *time_step)
|
|
Given the render context, returns a buffer in which to place the final rendered output. AEGP_GetCompToRender(
PR_RenderContextH render_contextH,
AEGP_CompH compH,
PF_EffectWorld *dst);
|
|
Given the render context provided to the Artisan at render time, returns a handle to the composition. AEGP_GetROI(
PR_RenderContextH render_contextH,
A_LegacyRect *roiPR);
|
|
Given the render context and layer, returns the layer texture. All parameters with a trailing ‘0’ are optional; the returned AEGP_RenderTexture(
PR_RenderContextH render_contextH,
AEGP_LayerH layerH,
AEGP_RenderHints render_hints,
A_FloatPoint *suggested_scaleP0,
A_FloatRect *suggsted_src_rectP0,
A_Matrix3 *src_matrixP0,
PF_EffectWorld *render_bufferP);
|
|
Disposes of an acquired layer texture. AEGP_DisposeTexture(
PR_RenderContextH render_contextH,
AEGP_LayerH layerH,
AEGP_WorldH *dst0);
|
|
Returns the field settings of the given AEGP_GetFieldRender(
PR_RenderContextH render_contextH,
PF_Field *field);
|
|
Given the render context provided to the Artisan at render time, returns a handle to the composition. Note: this is NOT thread-safe on macOS; only use this function when the current thread ID is 0. AEGP_ReportArtisanProgress(
PR_RenderContextH render_contextH,
A_long countL,
A_long totalL);
|
|
Returns the downsample factor of the AEGP_GetRenderDownsampleFactor(
PR_RenderContextH render_contextH,
AEGP_DownsampleFactor *dsfP);
|
|
Determines whether the AEGP_IsBlankCanvas(
PR_RenderContextH render_contextH,
A_Boolean *is_blankPB);
|
|
Given a render context and a layer (at a given time), retrieves the 4 by 4 transform to move between their coordinate spaces. AEGP_GetRenderLayerToWorldXform(
PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
const A_Time *comp_timeP,
A_Matrix4 *transform);
|
|
Retrieves the bounding rectangle of the layer_contextH (at a given time) within the render_contextH. AEGP_GetRenderLayerBounds(
PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
const A_Time *comp_timeP,
A_LegacyRect *boundsP);
|
|
Returns the opacity of the given layer context at the given time, within the render context. AEGP_GetRenderOpacity(
PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
const A_Time *comp_timePT,
A_FpLong *opacityPF);
|
|
Returns whether or not a given layer context is active within the render context, at the given time. AEGP_IsRenderLayerActive(
PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
const A_Time *comp_timePT,
A_Boolean *activePB);
|
|
Sets the progress information for a rendering Artisan. countL is the number of layers completed,
AEGP_SetArtisanLayerProgress(
PR_RenderContextH render_contextH,
A_long countL,
A_long num_layersL);
|
|
Similar to AEGP_RenderLayerPlus(
PR_RenderContextH r_contextH,
AEGP_LayerH layerH,
AEGP_RenderLayerContextH l_contextH,
AEGP_RenderHints render_hints,
AEGP_WorldH *bufferP);
|
|
Retrieves the AEGP_GetTrackMatteContext(
PR_RenderContextH rnder_contextH,
AEGP_RenderLayerContextH fill_contextH,
AEGP_RenderLayerContextH *mattePH);
|
|
Renders a texture into an The returned AEGP_RenderTextureWithReceipt(
PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
AEGP_RenderHints render_hints,
A_FloatPoint *suggested_scaleP0,
A_FloatRect *suggest_src_rectP0,
A_Matrix3 *src_matrixP0,
AEGP_RenderReceiptH *receiptPH,
AEGP_WorldH *dstPH);
|
|
Returns the number of software effects applied in the given AEGP_GetNumberOfSoftwareEffects(
PR_RenderContextH ren_contextH,
AEGP_RenderLayerContextH lyr_contextH,
A_short *num_sft_FXPS);
|
|
An improvement over AEGP_RenderLayerPlusWithReceipt(
PR_RenderContextH render_contextH,
AEGP_LayerH layerH,
AEGP_RenderLayerContextH layer_contextH,
AEGP_RenderHints render_hints,
AEGP_NumEffectsToRenderType num_effectsS,
AEGP_RenderReceiptH *receiptPH,
AEGP_WorldH *bufferPH);
|
|
Frees an AEGP_DisposeRenderReceipt(
AEGP_RenderReceiptH receiptH);
|
|
Checks with After Effects’ internal caching to determine whether a given AEGP_CheckRenderReceipt(
PR_RenderContextH current_contextH,
AEGP_RenderLayerContextH current_lyr_ctxtH,
AEGP_RenderReceiptH old_receiptH,
A_Boolean check_aceB,
AEGP_NumEffectsToRenderType num_effectsS,
AEGP_RenderReceiptStatus *receipt_statusP);
|
|
Generates a AEGP_GenerateRenderReceipt(
PR_RenderContextH current_contextH,
AEGP_RenderLayerContextH current_lyr_contextH,
AEGP_NumEffectsToRenderType num_effectsS,
AEGP_RenderReceiptH *render_receiptPH);
|
|
Returns the number of bins After Effects wants the artisan to render. AEGP_GetNumBinsToRender(
const PR_RenderContextH contextH,
A_long *num_binsPL);
|
|
Sets the given render context to be the n-th bin to be rendered by After Effects. AEGP_SetNthBin(
const PR_RenderContextH contextH,
A_long n);
|
|
Retrieves the type of the given bin. AEGP_GetBinType(
const PR_RenderContextH contextH,
AEGP_BinType *bin_typeP);
|
|
Retrieves the transform to correctly orient the layer being rendered with the output world. Pass AEGP_GetRenderLayerToWorldXform2D3D(
PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
const A_Time *comp_timeP,
A_Boolean only_2dB,
A_Matrix4 *transformP);
|
Note
Functions below are for interactive artisans only.
Function |
Purpose |
---|---|
|
Retrieves the platform-specific window context into which to draw the given AEGP_GetPlatformWindowRef(
const PR_RenderContextH contextH,
AEGP_PlatformWindowRef *window_refP);
|
|
Retrieves the source-to-frame downsample factor for the given AEGP_GetViewportScale(
const PR_RenderContextH contextH,
A_FpLong *scale_xPF,
A_FpLong *scale_yPF);
|
|
Retrieves to origin of the source, within the frame (necessary to translate between the two), for the given AEGP_GetViewportOrigin(
const PR_RenderContextH contextH,
A_long *origin_xPL,
A_long *origin_yPL);
|
|
Retrieves the bounding rectangle for the area to be drawn, for the given AEGP_GetViewportRect(
const PR_RenderContextH contextH,
A_LegacyRect *v_rectPR);
|
|
Retrieves the color used for the fallow regions in the given AEGP_GetFallowColor(
const PR_RenderContextH contextH,
PF_Pixel8 *fallow_colorP);
|
|
Retrieves whether or not the checkerboard is currently active for the given AEGP_GetInteractiveCheckerboard(
const PR_RenderContextH contextH,
A_Boolean *cboard_onPB);
|
|
Retrieves the colors used in the checkerboard. AEGP_GetInteractiveCheckerboardColors(
const PR_RenderContextH contextH,
PF_Pixel *color1P,
PF_Pixel *color2P);
|
|
Retrieves the width and height of one checkerboard square. AEGP_GetInteractiveCheckerboardSize(
const PR_RenderContextH contextH,
A_u_long *cbd_widthPLu,
A_u_long *cbd_heightPLu);
|
|
Retrieves the cached AEGP_WorldH last used for the AEGP_GetInteractiveCachedBuffer(
const PR_RenderContextH contextH,
AEGP_WorldH *buffer);
|
|
Determines whether or not the artisan must render the current AEGP_ArtisanMustRenderAsLayer(
const PR_RenderContextH contextH,
AEGP_RenderLayerContextH layer_contextH,
A_Boolean *use_txturePB);
|
|
Returns which channels should be displayed by the interactive artisan. AEGP_GetInteractiveDisplayChannel(
const PR_RenderContextH contextH,
AEGP_DisplayChannelType *channelP);
|
|
Returns the exposure for the given AEGP_GetInteractiveExposure(
const PR_RenderContextH rcH,
A_FpLong *exposurePF);
|
|
Returns the color transform for the given AEGP_GetColorTransform)(
const PR_RenderContextH render_contextH,
A_Boolean *cms_onB,
A_u_long *xform_keyLu,
void *xformP);
|
|
Returns the shutter angle for the given AEGP_GetCompShutterTime)(
PR_RenderContextH render_contextH,
A_Time *shutter_time,
A_Time *shutter_dur);
|
|
New in CC. Unlike AEGP_ConvertCompToLayerTime, this handles time remapping with collapsed or nested comps. AEGP_MapCompToLayerTime(
PR_RenderContextH render_contextH,
AEGP_RenderLayerContextH layer_contextH,
const A_Time *comp_timePT,
A_Time *layer_timePT);
|
Convert Between Different Contexts¶
Convert between render and instance contexts, and manage global data specific to the artisan.
AEGP_ArtisanUtilSuite1¶
Function |
Purpose |
---|---|
|
Given an instance context, returns a handle to the global context. AEGP_GetGlobalContextFromInstanceContext(
const PR_InstanceContextH instance_contextH,
PR_GlobalContextH *global_contextPH);
|
|
Given the render context, returns a handle to the instance context. AEGP_GetInstanceContextFromRenderContext(
const PR_RenderContextH render_contextH,
PR_InstanceContextH *instnc_ctextPH);
|
|
Given a query context, returns a handle to the instance context. AEGP_GetInstanceContextFromQueryContext(
const PR_QueryContextH query_contextH,
PR_InstanceContextH *instnce_contextPH);
|
|
Given the global context, returns a handle to global data. AEGP_GetGlobalData(
const PR_GlobalContextH global_contextH,
PR_GlobalDataH *global_dataPH);
|
|
Given an instance context, return the associated instance data. AEGP_GetInstanceData(
const PR_InstanceContextH instance_contextH,
PR_InstanceDataH *instance_dataPH);
|
|
Given a render context, returns the associated render data. AEGP_GetRenderData(
const PR_RenderContextH render_contextH,
PR_RenderDataH *render_dataPH);
|
Smile! Cameras¶
Obtains the camera geometry, including camera properties (type, lens, depth of field, focal distance, aperture, et cetera).
AEGP_CameraSuite2¶
Function |
Purpose |
---|---|
|
Given a layer handle and time, returns the current camera layer handle. AEGP_GetCamera(
PR_RenderContextH render_contextH,
const A_Time *comp_timeP,
AEGP_LayerH *camera_layerPH);
|
|
Given a layer, returns the camera type of the layer. AEGP_GetCameraType(
AEGP_LayerH aegp_layerH,
AEGP_CameraType *camera_typeP;
The camera type can be the following:
|
|
Given a composition handle, returns the camera distance to the image plane. AEGP_GetDefaultCamera DistanceToImagePlane(
AEGP_CompH compH,
A_FpLong *dist_to_planePF)
|
|
Retrieves the size (and units used to measure that size) of the film used by the designated camera. AEGP_GetCameraFilmSize(
AEGP_LayerH camera_layerH,
AEGP_FilmSizeUnits *film_size_unitsP,
A_FpLong *film_sizePF0);
|
|
Sets the size (and unites used to measure that size) of the film used by the designated camera. AEGP_SetCameraFilmSize)(
AEGP_LayerH camera_layerH,
AEGP_FilmSizeUnits film_size_units,
A_FpLong *film_sizePF0);
|
Notes Regarding Camera Behavior¶
Camera orientation is in composition coordinates, and the rotations are in layer (the camera’s layer) coordinates.
If the camera layer has a parent, the position is in a coordinate space relative to the parent.
Orthographic Camera Matrix¶
Internally, we use composition width and height to set the matrix described by the OpenGL specification as
glOrtho(-width/2, width/2, -height/2, height/2, -1, 100);
The orthographic matrix describes the projection. The position of the camera is described by another, scaled matrix. The inverse of the camera position matrix provides the “eye” coordinates.
Focus On Focal¶
Remember, focal length affects field of view; focal distance only affects depth of field.
Film Size¶
In the real world, film size is measured in millimeters. In After Effects, it’s measured in pixels. Multiply by 72 and divide by 25.4 to move from millimeters to pixels.
Field of view is more complex;
ϴ = 1/2 field of view
tan(ϴ) = 1/2 composition height / focal length
focal length = 2 tan(ϴ) / composition height
Hit The Lights!¶
Get and set the type of lights in a composition.
AEGP_LightSuite2¶
Function |
Purpose |
---|---|
|
Retrieves the AEGP_GetLightType(
AEGP_LayerH light_layerH,
AEGP_LightType *light_typeP);
|
|
Sets the AEGP_SetLightType(
AEGP_LayerH light_layerH,
AEGP_LightType light_type);
|
Notes On Light Behavior¶
The formula for parallel lights is found in Foley and Van Dam’s “Introduction to Computer Graphics” (ISBN 0-201-60921-5) as is the formula for point lights.
We use the half angle variant proposed by Jim Blinn instead.
Suppose we have a point on a layer and want to shade it with the light.
Let V be the unit vector from the layer point to the eye point. Let L be the unit vector to the light (in the parallel light case this is constant). Let H be (V+L)/2 (normalized). Let N be the unit normal vector to the layer.
The amount of specular reflected light is S * power(H Dot N, shine), where S is the specular coefficient.
How Should I Draw That?¶
After Effects relies upon Artisans to draw 3D layer handles. If your Artisan chooses not to respond to this call, the default Artisan will draw 3D layer handles for you. Querying transforms is important for optimization of After Effects’ caching.
The coordinate system is positive x to right, positive y down, positive z into the screen. The origin is the upper left corner. Rotations are x then y then z. For matrices the translate is the bottom row, orientations are quaternions (which are applied first), then any x-y-z rotation after that. As a general rule, use orientation or rotation but not both. Also use rotations if you need control over angular velocity.
Query Transform Functions¶
These functions give artisans information about the transforms they’ll need in order to correctly place layers within a composition and respond appropriately to the various queries After Effects will send to their PR_QueryFunc
entry point function.
As that entry point is optional, so is your artisan’s response to the queries; however, if you don’t, your users may be disappointed that (while doing interactive preview drawing) all the camera and light indicators vanish, until they stop moving! Artisans are complex beasts; contact us if you have any questions.
AEGP_QueryXFormSuite2¶
Function |
Purpose |
---|---|
|
Given a query context, returns trasnsform source currently being modified. AEGP_QueryXformGetSrcType(
PR_QueryContextH query_contextH,
AEGP_QueryXformType *src_type);
The query context will be one of the following:
|
|
Given a query context, returns the currently requested transform destination. AEGP_QueryXformGetDstType(
PR_QueryContextH query_contextH,
AEGP_QueryXformType *dst_type);
|
|
Used if the source or destination type is a layer. Given a query context, returns the layer handle. AEGP_QueryXformGetLayer(
PR_QueryContextH query_contextH,
AEGP_LayerH *layerPH);
|
|
Given a query context, returns the current composition handle. AEGP_QueryXformGetComp(
PR_QueryContextH query_contextH,
AEGP_CompH *compPH);
|
|
Given a query context, returns the time of the transformation. AEGP_QueryXformGetTransformTime(
PR_QueryContextH query_contextH,
A_Time *time);
|
|
Given a query context, returns the time of the associated view. AEGP_QueryXformGetViewTime(
PR_QueryContextH query_contextH,
A_Time *time);
|
|
Given a query context, returns the current camera layer handle. AEGP_QueryXformGetCamera(
PR_QueryContextH query_contextH,
AEGP_LayerH *camera_layerPH);
|
|
Given a query context, returns the current matrix transform. AEGP_QueryXformGetXform(
PR_QueryContextH query_contextH,
A_Matrix4 *xform);
|
|
Given a query context, return the matrix transform you compute in AEGP_QueryXformSetXform(
PR_QueryContextH query_contextH,
A_Matrix4 *xform);
|
|
Sets the window reference to be used (by After Effects) for the given AEGP_QueryWindowRef(
PR_QueryContextH q_contextH,
AEGP_PlatformWindowRef *window_refP);
|
|
Returns which AEGP_QueryWindowClear(
PR_QueryContextH q_contextH,
AEGP_PlatformWindowRef *window_refP,
A_LegacyRect *boundsPR);
|
|
Returns whether or not the textures used in the given AEGP_QueryFrozenProxy(
PR_QueryContextH q_contextH,
A_Boolean *onPB);
|
|
Sent after rendering and camera/light handle drawing is complete; After Effects returns the buffer into which the artisan should draw its output. AEGP_QuerySwapBuffer(
PR_QueryContextH q_contextH,
AEGP_PlatformWindowRef *window_refP,
AEGP_WorldH *dest_bufferp);
|
|
Sets the interactive drawing functions After Effects will call while drawing camera and lighting handles into the artisan’s provided context. AEGP_QueryDrawProcs(
PR_QueryContextH query_contextH,
PR_InteractiveDrawProcs *window_refP);
|
|
Informs After Effects about the context into which it will be drawing. AEGP_QueryPrepareForLineDrawing(
PR_QueryContextH query_contextH,
AEGP_PlatformWindowRef *window_refP,
A_LegacyRect *viewportP,
A_LPoint *originP,
A_FloatPoint *scaleP);
|
|
As far as After Effects is concerned, the artisan is done drawing lines. AEGP_QueryUnprepareForLineDrawing(
PR_QueryContextH query_contextH,
AEGP_PlatformWindowRef *window_refP);
|
Interactive Drawing Functions¶
We’ve added the ability for artisans to provide functions After Effects can use to do basic drawing functions for updating the comp window display during preview, including camera, light, and wireframe preview modeling.
PR_InteractiveDrawProcs¶
Function |
Purpose |
---|---|
|
PR_Draw_MoveToFunc(
short x,
short y);
|
|
PR_Draw_LineToFunc(
short x,
short y);
|
|
PR_Draw_ForeColorFunc(
const A_Color *fore_colo
|
|
PR_Draw_FrameRectFunc(
const A_Rect *rectPR );
|
|
PR_Draw_PaintRectFunc(
const A_Rect *rectPR );
|
Notes On Query Time Functions¶
AEGP_QueryXformGetTransformTime()
and AEGP_QueryXformGetViewTime()
are both necessary for an artisan to build a representation of the scene to render.
AEGP_QueryXformGetTransformTime()
gets the time of the transform, which is then passed to AEGP_GetCompShutterFrameRange()
from AEGP_CompSuite11.
AEGP_QueryXformGetViewTime()
gets the time of the view, which is used in calling AEGP_GetLayerToWorldXformFromView()
from AEGP_LayerSuite9.