Overview (Macros For Effects) |
Print Previous Next |
Introduction
Overview The following functions are called by MADRIX for each effect and can be implemented by a macro in order to react to different events:
InitEffect (Automatically included in a new macro) InitEffect is called by MADRIX whenever the script needs to be initialized. This is the case after compiling and starting a new macro or when the user pressed the Start button of the »Script Editor. A macro can assume that any global variable is initialized with 0 and that any global array is empty as long as it has not been initialized with any value.
PreRenderEffect (Automatically included in a new macro) PreRenderEffect is called before the effect is going to be rendered. Changes done here affect the current frame, but may be overwritten by the effect itself.
PostRenderEffect (Automatically included in a new macro) This function is called after the effect has been rendered. Here, the result of the effect can be manipulated. You could use a gray filter on it, for example. Note: The matrix, which the macro manipulates, is the same matrix that the effect uses to calculate its own effect. The effect may rely on the output being the input for the next frame with undefined behavior. Also note: Mapping operations done in PostRenderEffect will effect the next frame, but not the current one. To control the current frame, please use PreRenderEffect.
MatrixSizeChanged (Automatically included in a new macro) MatixSizeChanged is called after the size of the matrix has been changed. This may be due to a change to the matrix settings.
Standard Outline When you open the Effect Macro Editor, the empty standard macro will look like this: @scriptname=""; @author=""; @version=""; @description="";
void InitEffect() {
}
void PreRenderEffect() {
}
void PostRenderEffect() {
}
void MatrixSizeChanged() { InitEffect(); }
|
MADRIX Version: 3.6j | Script Version: 2.22 |
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100% |
Print Previous Next |