Monday 28 January 2013

Expression Controls


Expression Controls

Expression Controls are actually layer effects whose main purpose is to allow you to
attach user interface controls to an expression. These controls come in six versions:
. Slider Control
. Point Control
. Angle Control
. Checkbox Control
. Color Control
. Layer Control
All types of controls (except the Layer Control) can be keyframed and can themselves
accept expressions. The most common use, however, is to enable you to set or change
a value used in an expression calculation without having to edit the code. For example,
you might want to be able to easily adjust the frequency and amplitude
parameters of a wiggle() expression. You could accomplish this by applying two
Slider Controls to the layer with the expression (Effects > Expression Controls). It’s
usually a good idea to give your controls descriptive names; say you change the name
of the first slider to frequency and the second one to amplitude. You would then set
up your expression like this (using the pickwhip to create the references to the sliders
would be smart):
freq = effect(“frequency”)(“Slider”);
amp = effect(“amplitude”)(“Slider”);
wiggle(freq, amp)
Now, you can control the frequency and amplitude of the wiggle via the sliders. With
each of the control types (again, with the exception of the Layer Control) you can edit
the numeric value directly, or you set the value using the control’s gadget.
One unfortunate side note about expression controls is that because you can’t apply
effects to cameras or lights, neither can you apply expression controls to them.

No comments:

Post a Comment