User Manual

Table Of Contents
As an example, we’ll customize the controls for a DirectionalBlur:
The Inspector for a default direction blur.
Let’s say we wanted a more interactive way of controlling a linear blur in the viewer, rather than
using the Length and Angle sliders in the Inspector. Using a SimpleExpression, we’ll control the
length and angle parameters with the Center parameter’s onscreen control in the viewer. The
SimpleExpression would look something like this:
For Length:
sqrt(((Center.X-.5)*(self.Input.XScale))^2+((Center.Y-.5)*(self.Input.YScale)*(self.
Input.Height/self.Input.Width))^2)
For Angle:
atan2(.5-Center.Y , .5-Center.X) * 180 / pi
DirectionalBlur controlled by the Center’s position.
This admittedly somewhat advanced function does the job fine. Dragging the onscreen control
adjusts the angle and length for the directional blur. However, now the names of the parameters
are confusing. The Center parameter doesn’t function as the center anymore. It is the direction
and length of the blur. It should be named “Blur Vector” instead. You no longer need to edit the
Length and Angle controls, so they should be hidden away, and since this is only for a linear
blur, we don’t need the Type menu to include Radial or Zoom. We only need to choose
between Linear and Centered. These changes can easily be made in the Edit Controls dialog.
To change the Inspector parameters for the example above:
1 In the Edit Control dialog, select the Center from the ID list.
2 A dialog will appear asking if you would like to Replace, Hide, or Change ID. We’ll
choose Replace.
3 Change the Name to Blur Vector.
Chapter – 63 Using Modifiers, Expressions, and Custom Controls 1272