The interface for the animator project has recently
been improved to allow for grouping of variables (under tabs in the control
view and in cascading menus in the curve editor). If you want to update your
model to use these new grouping options, it is a very simple process:
·
The
changes will occur in your model’s init() function, along with the rest of your
UI initializations.
·
To
create groups, simply call group(“Name”).
·
To
add items to a specific group, you will use the same calls to scale, checkbox,
and curve that you used before, but append the group number to the argument
list.
·
Unfortunately,
menu type controls cannot yet be grouped. If you have multiple groups and
create a menu, it will be placed in the first group automatically.
Here is an example of the changes you’ll need to
make, using the Flick model.:
Before the change:
scale(
BASE_ROTATION, "base rotation", 0.0, 360.0, 0.1, 10);
scale(
RIGHT_ULEG_ROTATION, "right leg rotation", 25.0, -25.0, 0.1, 13.4);
…
scale(
TWIST, "twist", -45.0, 45.0, 0.5, 32.0);
scale( CURL,
"curl", -90.0, 90.0, 0.5, 13.5);
…
After
the change (changes in bold):
group("Main");
//create main control group
scale(
BASE_ROTATION, "base rotation", 0.0, 360.0, 0.1, 10,0); //add scale to control group
scale(
RIGHT_ULEG_ROTATION, "right leg rotation", 25.0, -25.0, 0.1,
13.4); //again, but using default
param.
…
group("Antennae");
//create a second control group for the
Antennae
scale(
TWIST, "twist", -45.0, 45.0, 0.5, 32.0,1 ); //add scale to antennae group
scale( CURL,
"curl", -90.0, 90.0, 0.5, 13.5 ,1); //and again.
…
The resulting UI, divided into two tabs in control mode .
. .
...
and cascading menus in the curve editor.