Apple Shake 4 User Manual

Page 389

Advertising
background image

Chapter 14

Customizing Shake

389

Box Controls

In the startup macro file:

int left = width/3,
int right = width*.66,
int bottom = height/3,
int top = height*.66

In the ui file:

nuiPushControlGroup(“MyFunction.Box Controls”);

nuiGroupControl(“MyFunction.left”);
nuiGroupControl(“MyFunction.right”);
nuiGroupControl(“MyFunction.bottom”);
nuiGroupControl(“MyFunction.top”);

nuiPopControlGroup();

This creates a movable box. You can grab corners or edges, or the inside crosshairs. This
example is applied to a SetDOD function. The Layer–Constraint and Transform–Crop
nodes also use these controls. In this example, integers are used for values that assume
you are cutting off pixels, but you can also use float values.

Advertising