Go to: Synopsis. Return value. Related. Flags. MEL examples.
attachDeviceAttr [-attribute string] [-axis string] [-camera] [-cameraRotate] [-cameraTranslate] [-clutch string] [-device string] [-selection]
attachDeviceAttr is undoable, queryable, and NOT editable.
This command associates a device/axis pair with a node/attribute pair.
When the device axis moves, the value of the attribute is set to the
value of the axis. This value can be scaled and offset using
the setAttrScale command.
None
In query mode, return type is based on queried flag.
assignInputDevice, detachDeviceAttr, devicePanel, getInputDeviceRange, getModifiers, listDeviceAttachments, listInputDeviceAxes, listInputDeviceButtons, listInputDevices, recordAttr, setAttrMapping, setInputDeviceMapping, unassignInputDevice
attribute, axis, camera, cameraRotate, cameraTranslate, clutch, device, selection
Long name (short name) |
Argument types |
Properties |
|
-attribute(-at)
|
string
|
|
|
specify the attribute to attach to
|
|
-axis(-ax)
|
string
|
|
|
specify the axis to attach from.
|
|
-camera(-cam)
|
|
|
|
This flag attaches the device/axis to the current camera.
The mapping between device axes and camera controls is
uses a heuristic based on the device descripton.
The interaction is a copy of the mouse camera navigation
controls.
|
|
-cameraRotate(-cr)
|
|
|
|
This flag attaches the device/axis to the current cameras
rotation controls.
|
|
-cameraTranslate(-ct)
|
|
|
|
This flag attaches the device/axis to the current cameras
translate controls.
|
|
-clutch(-c)
|
string
|
|
|
specify a clutch button. This button must be down
for the command string to be executed.
If no clutch is specified the command string is
executed everytime the device state changes
|
|
-device(-d)
|
string
|
|
|
specify which device to assign the command string.
|
|
-selection(-sl)
|
|
|
|
This flag attaches to the nodes in the selection list.
This is different from the default arguments of the command
since changing the selection will change the attachments.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command.
|
attachDeviceAttr -d "spaceball" -ax "XAxis" "surface1.translateX";
// This command will assign the XAxis of the spaceball to
// the translateX attribute of surface1. This
// assignment is independent of the selection list (i.e.
// if surface1 was selected when the command is executed,
// surface1 will be translated by the spaceball regardless
// of the current selection.)
attachDeviceAttr -d "spaceball" -ax "XAxis" -at translateX;
// This command will assign the XAxis of the spaceball to
// the translateX attribute of the selected objects.
attachDeviceAttr -d "wacom" -ax "puck:X" -c "puckButton1" -at "translateX" -sl;
attachDeviceAttr -d "wacom" -ax "puck:Y" -c "puckButton1" -at "translateY" -sl;
// This command will attach the wacom puck X and Y axes to the
// X and Y translate attributes of the selected items.
// When the selection changes so does the attachment.
// The -c option means you can only move the selected items
// with the puck when button1 on the puck is down.