Timing Info Structure
FxFactory lets you designate one of the structure inputs of your Quartz composition to receive a Timing Info Structure. This mapping is available under the Inputs section of the plug-in development UI.
The value fed to the selected input is a dictionary with the following keys and values which express properties of the effect being rendered:
frame contains a value corresponding to the current frame being rendered. This value is an integer if the sequence (or project, when running in Motion) is progressive, or by a fractional value if the image source is interlaced. The fractional component, if present, is always equal to 0.5 and it represents the first field in a given frame (e.g. 2.5 represents the first field in the 3 frame).
frameRate contains the frame rate used by the sequence (or project, when running inside Motion). For example, 29.97 for NTSC, 25 for PAL.
frameRateNumerator and frameRateDenominator contain integer values which express the frame rate as an fraction (e.g. 2997 and 100 for a frame rate of 29.97).
duration contains the duration, in frames, of the portion of the timeline where the plug-in has been applied.
timelineInPoint and timelineOutPoint contain the in and out points (expressed as frame numbers) where the plug-in is being used.
sampleIndex contains the index of the current sample, which will be greater than zero when the composition is being rendered multiple times per frame. This occurs when the plug-in supports motion blur and the user has chosen to turn the feature on.
samplesCount contains the total number of samples that will be rendered to generate a single output frame. This number will be 1 when motion blur is off.
Although it is certainly possible to extract values from a Timing Info structure using multiple “Structure Key Member” patches in Quartz Composer, it is recommended that you use the “FxFactory Timing Info” patch instead. This patch has been designed to make this job easier for you, and it also provides additional outputs that will help you develop plug-ins: