pymel.core.animation.defineDataServer

defineDataServer(*args, **kwargs)

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 listInputDeviceAxesto 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” -u does 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.

Flags:
Long name (short name) Argument Types Properties
device (d) unicode ../../../_images/create.gif
 
specified the device name to be given to the server connection. device name must be unique or the command fails.
server (s) unicode ../../../_images/create.gif
 

specifies the name of the server with which the define device connects, and can be specifiied in two ways name– the name of the server socketServer names of the form nameconnect to the server socket on the localhost corresponding to name. If namedoes not begin with “/”, then /tmp/nameis used. This is the default behavior of most servers. If namebegins with “/”, namedenotes the full path to the socket.host:service- a udp service on the specified host.The servicecan be any one of a “udp service name,” a “port number,” or a named service of “tcpmux,” and they are found in that order. If hostis omitted, the localhost is used.In any case, if the server cannot be found, the device is not defined (created) and the command fails.

undefine (u) bool ../../../_images/create.gif
 

undefines (destroys) the dataServer device, closing the connection with the server.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.defineDataServer

Example:

import pymel.core as pm

import maya.cmds as cmds

pm.defineDataServer( s='ultratrak_server', d='melvin' )

# Connects to the ultratrak_server running on the localhost and gives it
# the name "melvin"

pm.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".

pm.defineDataServer( undefine=True, d='labFlock' )

# Delete the device "labFlock" closing the connection with the server
# specified when it was created.

Previous topic

pymel.core.animation.dagPose

Next topic

pymel.core.animation.defineVirtualDevice

Core

Core Modules

Other Modules

This Page