Import Statement

Declaration

Constants

kFxTimeBase_TIMELINE

kFxTimeBase_TIMELINE

Times are absolute frame numbers, where 0 is the start of the timeline.

kFxTimeBase_CLIP

kFxTimeBase_CLIP

Times are "clip-relative," meaning that 0 is the start of the clip. For generators and transitions, the clip is the effect itself. For filters, the clip is the video item to which the filter is applied.

Declaration

Constants

frame

frame

The requested time to be rendered, expressed in a frame number on the project or sequence's timeline. Note that this is a floating-point frame number. In interlaced video, the time for the first field would be an integer i; for the second field, a non integer (i + 0.5).

The field-order of the frame to be rendered. The value will be kFxFieldOrder_PROGRESSIVE for rendering previews, and for progressive footage., When a plug-in needs to render interlaced footage, it will be a constant value for all fields your plug-in is asked to render. For example, if a plug-in is applied to NTSC DV footage, generally this type of footage has a field order of kFxFieldOrder_LOWER_FIRST. When asked to render fields, the fieldOrder value will always be kFxFieldOrder_LOWER_FIRST. When rendering thumbnails for the layer list in Motion the value will be kFxFieldOrder_PROGRESSIVE). In order to determine which field a plug-in is actually being asked to render, check the output image's field method. This will alternate between kFxField_UPPER and kFxField_LOWER for interlaced footage when rendering fields. Before FxPlug 1.2, this was an FxField, not an FxFieldOrder. The two are binary compatible, but plug-ins should use the FxFieldOrder type.

scaleX

scaleX

The requested horizontal scale value. When the value is less than 1, then the calculation coordinates need to account for the scale before sampling from the input image.

scaleY

scaleY

The requested vertical scale value. When the value is less than 1, then the calculation coordinates need to account for the scale before sampling from the input image.

sharedContext

sharedContext

The OpenGL shared context. This may be NULL when doing a software render.

Discussion

The pixel aspect ratio is not taken into account when the scaleX and scaleY values are computed. Plug-ins should look at the input and output FxImageInfo structure to determine pixel aspect ratios.

The sharedContext allows the plug-in to create its own OpenGL context that shares the textures supplied by the application the plug-in. You do not normally need to use this context unless you have to create a new context of and wish for it to share the input and output textures. You would never use this context directly for drawing, either. The application sets the current context to draw into the output texture before calling the plug-in.