Server

A server is a stand-alone program that communicates with a device. Maya can talk to the server to get device data. Devices that require servers are called data-server devices.

Example: mayaClockServer

To help you learn about motion capture, Maya includes an example motion capture server, the mayaClockServer program. This program reads the system clock and outputs three rotation values in radians: the angle of the second hand, minute hand, and hour hand. You don’t need special hardware. The mayaClockServer can be found in the following location:

(Linux) /usr/autodesk/<Maya version>/bin

(Windows) Drive:\Program Files\Autodesk\<Maya version>\bin

(Mac OS X) Doesn’t exist for the Mac. Its operating system has a .c file in the devkit/mocap directory of your Developer Kit installation.

Note:

The Developer Kit is available from the Autodesk Developer Network.

To view mayaClockServer options, enter the following command from the command prompt of the preceding directory:

mayaClockServer -h

You can also find an example script for using mayaClockServer. To see a demo of the clock, enter the following in the Maya Script Editor:

mayaClockDemo

The script launches mayaClockServer using the MEL system command, defines a device named “clock,” creates three analog clock hands, and connects the geometry to the clock.

Note:

If you have already defined the clock device, undefine it and use the flushUndo command to flush the undo queue before running the demo script.