Apple Shake 4 User Manual
Page 923
Chapter 30
Installing and Creating Macros
923
The keepAspect parameter has an on/off button.
Attaching Color Pickers and Subtrees
Using a slider to select a color is not nearly as impressive to your arch foes as using the
Color Picker, so attach bgRed, bgGreen, and bgBlue to a color control to interactively
pick your color. For the format information, see “
Using Parameters Controls Within
Since this is an interface change, edit the ui VidResizeUI.h file:
nuiPushMenu(“Tools”);
nuiPushToolBox(“Transform”);
nuiToolBoxItem(“@VidResize”,VidResize());
nuiPopToolBox();
nuiPopMenu();
nuxDefExprToggle(“VidResize.keepAspect”);
nuiPushControlGroup(“VidResize.Background Color”);
nuiGroupControl(“VidResize.bgRed”);
nuiGroupControl(“VidResize.bgGreen”);
nuiGroupControl(“VidResize.bgBlue”);
nuiPopControlGroup();
nuiPushControlWidget(“VidResize.Background Color”,
nuiConnectColorTriplet(kRGBToggle,kCurrentColor,1)
);
This file is interesting because the first five new lines are the code to make a subtree.
Even if you do not add the last lines to attach the color control, the three color sliders
are still organized in a subtree named Background Color.
The last three lines attach the color picker to the subtree called Background Color, and
sets the picker to select an RGB (as opposed to HSV, HLS, or CMY) color control that
uses the Current (as opposed to the Average, Maximum, or Minimum scrub) color.