Go to: Synopsis. Return value. Related. Flags. Python examples.
defineDataServer([device=string], [server=string], [undefine=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
defineDataServer is undoable, NOT queryable, and NOT editable.
Connects to the specified data servername, creating a named device which then can be attached to device handlers.
When the device is defined, it queries queries the server for data axis information. The "CapChannels" present are represented as axis in form "channelName"."usage" for scalar channels and "channelName"."component" for compound channels. See listInputDeviceAxes to list axis names.
Note that undoing
defineDataServer -d "myDevice" -s "myServer"does not break the connection with the data server until it cannot be redone. Executing any other command (sphere for example) will cause this to occur. Similarly, the command
defineDataServer -d "myDevice" -udoes not break the connection with the data server until it cannot be undone. Either flushUndo, or the 'defineDataServer' command falling" off the end of the undo queue causes this to occur, and the connection. to be broken.
No return value.
None
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
device(d)
|
string
|
![]() |
||
|
||||
server(s)
|
string
|
![]() |
||
|
||||
undefine(u)
|
boolean
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds cmds.defineDataServer( s='ultratrak_server', d='melvin' ) # Connects to the ultratrak_server running on the localhost and gives it # the name "melvin" cmds.defineDataServer( s='mocap_lab:5200', d='labFlock' ) # Creates a device called "labFlock" which connects to the server running # on host "mocap_lab" at port "5200". cmds.defineDataServer( undefine=True, d='labFlock' ) # Delete the device "labFlock" closing the connection with the server # specified when it was created.