Assigning the old color control – Apple Shake 4 User Manual

Page 380

Advertising
background image

380

Chapter 14

Customizing Shake

Notice that you must first group the parameters into a subtree (the first five lines of the
above example).

Color controls automatically appear if you name your trio red, green, blue or red1,
green1, blue1, or red2, green2, blue2.

There are three parameters for the nuiConnectColorPControl function. The first one is
the color space, which can be declared with either a string (for clarity) or an integer:

kRGBToggle 0
kHSVToggle 1
kHLSToggle 2
kCMYToggle 3

The second parameter describes the type of value to be scrubbed—the current,
average, minimum, or maximum. Again, you can use either the word or the integer.

kCurrentColor 0
kAverageColor 1
kMinColor 2
kMaxColor 3

The last parameter is a toggle to declare whether you use the current node’s pixel
values or the input node’s pixel values. You use either 0 or 1:

0 = current node

1 = input node

Use of the current node may possibly cause a feedback loop. Typically, for color
corrections, you use current node; for keyers, the input node.

Therefore, the above example creates a subtree called Color for the function called
MyFunction. The scrubber returns RGB values, of which only the current value is
returned. When the Color control is called, the Use Source Buffer is turned on.

Assigning the Old Color Control

In the ui directory:

nuiPushControlGroup(“Func.Color”);

nuiGroupControl(“Func.red”);
nuiGroupControl(“Func.green”);
nuiGroupControl(“Func.blue”);

Advertising