Compatible With ScriptsCompatible With ExpressionsCompatible With The Command Line

 

double motchan (object obj, arbitrary chan, time t )

 

Return Value: value of obj:chan at frame t

 

Arguments:

obj

object in question
chan int or string representing the channel to retrieve
t frame to get value from
 

This function is mainly used in Scripts in place of the Bracket Expressions used in Command Mode Variables (e.g. [Null:xpos] ). Bracket Expressions are illegal in Scripts so motchan is the only way to retrieve an items channel information from within a Script.

 

You can pass either a string or an int as the chan argument, however it is highly recommended that pass an int as the string version will be significantly slower.

 

The int version of motchan uses the 0 based index of the channels (0 = xpos, 1 = ypos, ..., 5 = bank etc.)

 

Example:

>motchan(Camera, 2, NOW )
>motchan(Camera, "zpos", NOW)

Both of these functions will get the zpos value of the Camera at the current frame, the first version will execute much faster though.

Converted from CHM to HTML with chm2web Pro 2.82 (unicode)