Controller

Functions for dealing with controller access.

GetControllers
Gets the controllers (and sub-controllers) of the passed anim, to a specified depth.
GetAnimatedSubAnims
Companion to GetControllers, to get the owning anims of the controllers.

GetControllers:

Gets the controllers (and sub-controllers) of the passed anim, to a specified depth.

Returns:

An array of all the controllers and sub-controllers of the passed anim (object or sub-anim). The array will not contain the passed anim.
Note: The returned array may contain duplicate controllers, if those controllers are instanced. Use TrimDuplicates on the array if this is a problem.

Arguments:
<anim>
The anim (object or sub-anim) who's sub-anim controllers are to be retrieved.
[depth:-1]
How deep to look in the sub-anim tree.
-1 will look for all sub-anims.
1 will only look for immediate children.
2 will look for children and "grandchildren, etc...
[ctrlArray:#()]
An array to store the controllers in.

Back to top...


GetAnimatedSubAnims:

Companion to GetControllers, to get the owning anims of the controllers.
ie, for:

subAnims = GetAnimatedSubAnims obj
ctrls = GetControllers obj

then this is guaranteed:

subAnims[n].controller == ctrls[n]

Returns:

An array of all the sub-anims of the passed anim (object or sub-anim). The array will not contain the passed anim.

Arguments:
<anim>
The anim (object or sub-anim) who's sub-anims are to be retrieved.
[depth:-1]
How deep to look in the sub-anim tree.
-1 will look for all sub-anims.
1 will only look for immediate children.
2 will look for children and "grandchildren, etc...
[saArray:#()]
An array to store the subAnims in.

Back to top...