Command

COMMAND QUERY NOTE:

The command queries can be run on a node that is part of an ExoSwitch Constraint system. The command finds the connected ExoSwitch Constraint and runs the flag query on that constraint. In some of the code examples below we list "exoSwitchConstraint1" as part of the command syntax. Keep in mind you do not have to declare a constraint to run the command query.

PYTHON NOTE:

According to Autodesk the Python implementation for Maya does not take in string arrays as part of a flag argument. The exoSwitchConstraint command takes string arrays for:

  • Declaring driven nodes
  • Appending the driven nodes
  • Removing nodes from the constraint
  • Disabling nodes
  • Enabling nodes
Because of this limitation the python command structure is forced to use the mel module and run an eval of the correlating MEL version of the command.
For example, to declare driven nodes on an ExoSwitch Constraint in python the command syntax looks as follows:


import maya.mel as mel
mel.eval('exoSwitchConstraint -dn {"locator1", "locator2"}')

stacks_image_B4717309-2E9E-4E2F-9B9F-27F2F363C690
stacks_image_804FA310-20DA-4155-B451-CBCD9807F4D4
-help (-h)

Return the list of command flags for the exoSwitchConstraint command.

Example Command Code:
stacks_image_788390E0-D720-41BB-BCFC-34479588698C
exoSwitchConstraint -h exoSwitchConstraint1;
stacks_image_DD9B06C0-8EF7-4DC7-81DC-521BC8300CCE
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', h=True)
stacks_image_B14B17E1-C9DA-49E2-8C1D-21F73F89BAC2
stacks_image_B7A9C4C1-9B33-4080-AC32-969ACA9036BB
-fullPath (-f)

Return the full DAG path of nodes when performing queries on an ExoSwitch Constraint system.

Example Command Code:
stacks_image_463AC7C5-D3AB-4B71-B5F6-6C10B964CFD5
exoSwitchConstraint -q -f -td exoSwitchConstraint1;
stacks_image_4CAB35D8-96B1-46BD-95A1-DD7C0B7A5C0C
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, f=True, td=True)
stacks_image_644743CC-5169-4794-9E57-DAAAD549256F
stacks_image_1A9A7A39-3876-4814-A1D5-69CA9E050B16
stacks_image_237336A2-C047-4D8F-9498-FF68C61BED14
stacks_image_6918094D-FD9A-4D4D-8D1D-EC9D17A6D618
-name (-n)

The -name flag can name a constraint on creation, edit the name of a constraint post creation and query the name of selected constraint

Example Command Code:
stacks_image_8441A24C-C575-4DC9-9B86-08B0331AD6C7
exoSwitchConstraint -n "LfootRigESC" -td "LfootController" -rd "LfootController";
exoSwitchConstraint -e -n "LfootRigESC" exoSwitchConstraint1;

string $selection[] = `ls -sl`;
exoSwitchConstraint -q -n $selection[0];
stacks_image_CB6F41C1-A986-409C-82E4-2751BA6844A8
import maya.cmds as cmds
cmds.exoSwitchConstraint(n='LfootRigESC', td='LfootController', rd='LfootController')
cmds.exoSwitchConstraint('exoSwitchConstraint1', e=True, n='LfootRigESC')

constraint = cmds.ls(sl=True)
cmds.exoSwitchConstraint(constraint[0], q=True, n=True)
stacks_image_ED0390CF-7D2C-434F-A0D7-8F2537394A8C
stacks_image_EA2EA90A-094C-43A7-AB50-597463A8563D
stacks_image_F073ABC8-DB47-45DB-9733-FC4C8085E0A3
stacks_image_839D2A51-1FA3-42AB-8D21-26DB0B01CB8E
-transDriver (-td) ( string )

Controls the translation driver on an ExoSwitch Constraint system.

Example Command Code:
stacks_image_4DCDA13B-F4C0-408B-A741-84C0C4290F91
exoSwitchConstraint -td "locator1";
exoSwitchConstraint -e -td "locator2" exoSwitchConstraint1;
exoSwitchConstraint -q -td exoSwitchConstraint1;
stacks_image_AE5FA877-D19D-4C4B-BE28-E53FF5B8785C
import maya.cmds as cmds
cmds.exoSwitchConstraint(td='locator1')
cmds.exoSwitchConstraint('exoSwitchConstraint1', e=True, td='locator2')
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, td=True)
stacks_image_9402BAE1-008C-4998-8C25-C7561074F516
stacks_image_7775BE39-C220-4718-86F1-D28B9DD6E446
stacks_image_CFE0C5BE-9D68-4EE2-A78B-A3014EEAB34F
stacks_image_F6135F33-20FD-44B9-8B00-064D8814C2F5
-rotDriver (-rd) ( string )

Controls the rotation driver on an ExoSwitch Constraint system.

Example Command Code:
stacks_image_3B0EE98F-C343-45D8-B952-38C9BB03174C
exoSwitchConstraint -rd "locator1";
exoSwitchConstraint -e -rd "locator1" exoSwitchConstraint1;
exoSwitchConstraint -q -rd exoSwitchConstraint1;
stacks_image_D58C457A-B53A-4D7B-B7DE-F0C699591C15
import maya.cmds as cmds
cmds.exoSwitchConstraint(rd='locator1')
cmds.exoSwitchConstraint('exoSwitchConstraint1', e=True, rd='locator2')
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, rd=True)
stacks_image_7C7900FD-A4D0-455E-AE5D-2207C856A19A
stacks_image_7ED234CA-47BD-478E-AC3F-D47A0E2BB970
stacks_image_5C6683DE-005F-49EE-9AFC-A65088454D0E
stacks_image_53044581-DCF0-4DBE-8711-774DA5A74631
-drivenNodes (-dn) ( string[] )

This flag helps set the nodes that are being driven by the translation and or rotation masters. It can be used during creation. When used in edit mode it replaces all current driven nodes in the system - if you would like to add a set of nodes to be driven to a given ExoSwitch Constraint system use the -appendDrivenNodes flag (-adn). You can also query which nodes are being driven on a constraint.

Example Command Code:
stacks_image_650953C7-0A88-4349-9206-4BD8A4640B1C
exoSwitchConstraint -dn {"locator1", "locator2"};

// REPLACE ALL THE DRIVEN NODES FOR A GIVEN CONSTRAINT
exoSwitchConstraint -e -dn {"locator1", "locator2"} exoSwitchConstraint1;

exoSwitchConstraint -q -dn exoSwitchConstraint1;
stacks_image_8161DA14-959F-4694-8087-257319C11148
import maya.mel as mel
mel.eval('exoSwitchConstraint -e -dn {"locator1", "locator2"} exoSwitchConstraint1')
stacks_image_10DFE765-8112-44BD-93FB-F98F3B44DF36
stacks_image_A58FC534-A794-4B3C-951A-0431616255B0
-appendDrivenNodes (-adn) ( string[] )

This flag connects new nodes to the specified constraint system and adds the nodes in the array of the existing list of driven nodes.

Example Command Code:
stacks_image_F8588E01-7144-47DE-BBC7-1F201528B939
// APPENDS TO CURRENT DRIVEN NODE ARRAY
exoSwitchConstraint -e -adn {"locator3", "locator4"} exoSwitchConstraint1;
stacks_image_B092DE5F-7D08-4D7C-AA71-8DC15D4F1BB2
import maya.mel as mel
mel.eval('exoSwitchConstraint -e -adn {"locator3", "locator4"} exoSwitchConstraint1')
stacks_image_67F8AEAA-6434-4FAA-B749-277117E1F238
stacks_image_B7202D31-F789-4FA0-A657-7B42DD466D8A
stacks_image_23C5C934-3EE8-42E8-820D-3D914742DB93
-removeNodes (-rm) ( string[] )

Removes nodes in the given array from the declared ExoSwitch Constraint system.
Any animation data pertaining to each node in the given array is destroyed.
To preserve animation see the -preserveAnimation flag.

Example Command Code:
stacks_image_A9AB20EE-CF93-4C0D-B6D8-D227610E662F
exoSwitchConstraint -e -rm {"locator1", "locator2"} exoSwitchConstraint1;
stacks_image_6DCD270C-14B4-498E-A48B-3E0C3D6EAC9E
import maya.mel as mel
mel.eval('exoSwitchConstraint -e -rm {"locator1", "locator2"} exoSwitchConstraint1')
stacks_image_29F38F4B-28F8-40C1-BFB9-C580D135BEFD
stacks_image_E0CD3CC1-A2E6-4720-8100-DCC5EA1771BF
stacks_image_8A443BF5-EA7C-4202-BE8D-5495EA860DC6
-disableNodes (-dsn) ( bool, string[] )

Queries the disabled nodes on a particular ExoSwitch Constraint.

Example Command Code:
stacks_image_AF9AF6B9-D665-4636-9B5D-8F7FEA58F309
exoSwitchConstraint -e -dsn 1 {"locator1", "locator2"} exoSwitchConstraint1;
exoSwitchConstraint -q -dsn exoSwitchConstraint1;
stacks_image_23CFD37F-6816-4055-8D88-177CCA66112B
import maya.mel as mel
mel.eval('exoSwitchConstraint -e -dsn 1 {"locator1", "locator2"} exoSwitchConstraint1')
stacks_image_0E4F7924-1B07-4E8B-ACDB-E248CBEC7DD9
stacks_image_1CD5F9EE-E8A5-47A4-9C51-138DAA99EFD2
-animatedNodes (-an) ( string[] )

Queries animated nodes connected to a particular ExoSwitch Constraint.

Example Command Code:
stacks_image_CBD0A92C-B72D-47F9-A3E0-ABD3811FA409
exoSwitchConstraint -q -an exoSwitchConstraint1;
stacks_image_21D15C26-69C2-4081-8CD4-F67647F330A3
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, an=True)
stacks_image_43002273-CA3D-4DDC-BE0C-F0AD8F484F23
stacks_image_E323A941-0B97-41BC-87EE-F01D20EDE484
-constraintMembers (-cm) ( string[] )

Queries all the nodes connected to a particular ExoSwitch Constraint.

Example Command Code:
stacks_image_FCEE9D6F-073B-4487-9053-F61145C6AFD9
exoSwitchConstraint -q -cm exoSwitchConstraint1;
stacks_image_CD9FEC86-0F6C-4A6C-9E69-713CB1148FB7
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, cm=True)
stacks_image_51A57D15-1919-496E-A379-87011A5F1106
stacks_image_758F9DC5-D372-43D2-B5B7-3A1855F731CC
-constraintMemberName (-cmn) ( in=int, out=string )

Returns the name of a constraint member given a plug number integer as input.

Example Command Code:
stacks_image_511A558E-17AB-4C74-BD91-15C061B07B25
exoSwitchConstraint -cmn 0 exoSwitchConstraint1;
stacks_image_6EC6C8B9-56F8-4E1F-9384-D479748424B5
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', cmn=0)
stacks_image_E7AF2222-427E-4FD5-B2DA-A2C33E5982E9
stacks_image_6DDDC867-58D1-463C-B1B5-EC1B55FD3D6F
stacks_image_87930E20-E74B-43B7-BCD1-7A2E1088EC88
stacks_image_C2A42358-C1A7-4D6B-B2B8-CE4D33EA4377
-autoSwitch (-asw) ( bool )

This flags automatically sets the translation and rotation drivers for an ExoSwitch Constraint system based on selection.
This is interactive so as a user changes selection the drivers are updated.
This provides an intuitive and fast workflow for posing ExoSwitch Constraint systems.

Example Command Code:
stacks_image_F3ADEC47-3DE7-472B-A671-5D6100F56B1D
exoSwitchConstraint -asw 1 exoSwitchConstraint1;
exoSwitchConstraint -e -asw 0 exoSwitchConstraint1;
exoSwitchConstraint -q -asw exoSwitchConstraint1;
stacks_image_C7B927A2-6D61-4D32-AFEF-18634A245328
import maya.cmds as cmds
cmds.exoSwitchConstraint(asw=True)
cmds.exoSwitchConstraint('exoSwitchConstraint1', e=True, asw=False)
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, asw=True)
stacks_image_289EAACD-9893-4815-8083-058175BB0D5E
stacks_image_1B780D70-B2F9-4995-B024-0E8EF0EEEBF1
stacks_image_79E17171-967F-442A-A4B0-4A66D322CAE4
stacks_image_B2EACF10-9976-4E86-BCFA-FC1297101D6D
-autoDriverSelect (-ads) ( bool )

This flag will automatically select the driver for the current frame.
As animation plays, if the drivers for the system change it will be reflected via selection.

Example Command Code:
stacks_image_64852367-E4C1-4B75-B976-7FB1A4EEDE73
exoSwitchConstraint -ads 1;
exoSwitchConstraint -e -ads 0 exoSwitchConstraint1;
exoSwitchConstraint -q -ads exoSwitchConstraint1;
stacks_image_DAD5D575-2134-481B-B435-7A57284077E9
import maya.cmds as cmds
cmds.exoSwitchConstraint(ads=True)
cmds.exoSwitchConstraint('exoSwitchConstraint1', e=True, ads=False)
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, ads=True)
stacks_image_27545285-540B-493F-AAD7-0BAAEA3457D1
stacks_image_056D7B51-9B1C-4169-BC60-675C4BD65761
stacks_image_62EEA9F8-DBCD-4BAE-9296-3A106181046C
stacks_image_A6F57637-0880-4318-B3C8-D0C95442D077
-autoKeySwitch (-aks) ( bool )

This flag will keyframe the transDriver and rotDriver attributes every time the system changes drivers.

Example Command Code:
stacks_image_32749324-C8EA-43FD-8814-F325D3A173DE
exoSwitchConstraint -aks 1;
exoSwitchConstraint -e -aks 0 exoSwitchConstraint1;
exoSwitchConstraint -q -aks exoSwitchConstraint1;
stacks_image_46CE1D07-9284-42A1-820D-912D47633877
import maya.cmds as cmds
cmds.exoSwitchConstraint(ads=True)
cmds.exoSwitchConstraint('exoSwitchConstraint1', e=True, aks=False)
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, aks=True)
stacks_image_11FB8E63-5BFF-4B86-94C2-647CDD8083B6
stacks_image_15DB7AB9-388C-4669-9637-712A307523E7
-preserveAnimation (-pa) ( bool )

Keeps the animation on a node when being disconnected from an ExoSwitch Constraint.

Example Command Code:
stacks_image_9A43A8D2-7D06-4ECC-80B8-FFA1429CB639
exoSwitchConstraint -e -rm {"locator1"} -pa 1 exoSwitchConstraint1;
stacks_image_768F4B02-BD6B-4816-9142-E764B749B7B1
import maya.cmds as cmds
cmds.exoSwitchConstraint(q=True, f=True, td=True, "exoSwitchConstraint1")
stacks_image_98D04967-9841-45E0-86E9-9B546B89360E
stacks_image_4DF16045-D231-4D4D-A24B-6FD67436D8DD
-maskConfigName (-mna) ( in=int, out=string )

Returns the name of the mask configuration for the input integer given with the flag

Example Command Code:
stacks_image_21AC22D3-9A4E-48E9-9B0A-15A4ECD52224
exoSwitchConstraint -mna 0 exoSwitchConstraint1;
stacks_image_3EF42347-2F84-4AAF-B29A-5E0B37E7FED9
import maya.cmds as cmds
cmds.exoSwitchConstraint(mna=0)
stacks_image_7512456B-7A9D-46B8-9BF4-92C90C9891C2
stacks_image_F360C5C1-7EA1-4175-981F-86354F7C3D38
-maskConfigNames (-mns)

Returns the names of all the mask configurations on the constraint node

Example Command Code:
stacks_image_259C042C-B284-4E65-B48D-87072CC47F15
exoSwitchConstraint -q -mns exoSwitchConstraint1;
stacks_image_CABA90C1-3AC2-456F-B328-BE36DC8E8034
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, mns=True)
stacks_image_F59C959B-F2E7-4051-B3CF-F076E25B2268
stacks_image_7A93E7A6-02E9-42FA-8A9E-D75232183C25
-maskConfigNumber (-mcn) (in=string, out=int )

Return the mask configuration number given the input mask configuration name string

Example Command Code:
stacks_image_F8225838-BE0A-401D-A96F-CA14D0D18A46
exoSwitchConstraint -mcn "myMaskConfig" exoSwitchConstraint1;
stacks_image_B5590930-42A4-4F47-A675-3E785182F9B9
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', mcn='myMaskConfig')
stacks_image_9DD3C1EF-454F-4941-9067-781F1C4FA766
stacks_image_CC4E81B3-4D5C-49B9-811F-EFDE6F8E8B2E
-maskConfigNumbers (-mnu)

Return the mask configuration integer numbers for all the mask configs on the given constraint

Example Command Code:
stacks_image_378A6655-FAE7-4E2B-9051-87B707F596DB
exoSwitchConstraint -q -mnu exoSwitchConstraint1;
stacks_image_F291DE7D-1FF9-4F58-BB6E-7AF09CBECCD0
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, mnu=True)
stacks_image_C95A62F8-CC51-4153-913F-4DEAD794CEA4
stacks_image_11B4B475-8E79-4395-9E7C-8478F62079FD
-currentMaskName (-cna)

Return the name of the current mask configuration.

Example Command Code:
stacks_image_6276D802-4867-42CA-A084-8F2F5A1A7D8A
exoSwitchConstraint -q -cna exoSwitchConstraint1;
stacks_image_AE43C3BB-AD48-4021-9F30-F203E306DE45
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, cna=True)
stacks_image_CEBAC64B-4271-464D-B776-045E6292C937
stacks_image_998080B2-49CB-4EDD-AFA4-DB922DB1B1AD
-currentMaskNumber (-cnu)

Return the current mask configuration id number as an integer.

Example Command Code:
stacks_image_204A9F8D-E7FE-4CAC-B280-26CF776AEEC9
exoSwitchConstraint -q -cnu exoSwitchConstraint1;
stacks_image_61C82E25-784B-4CD9-923E-6BF580A203A5
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, cnu=True)
stacks_image_5ECC21A9-6271-475C-BF61-18A676A7C7CB
stacks_image_D0119EDD-628F-422F-BC8A-8BF6AB8167AD
-addMaskConfig (-amc)

Adds a new mask configuration to the constraint system with the input name.

Example Command Code:
stacks_image_F8AE4233-2F09-45AD-B524-8072EACDA11C
exoSwitchConstraint -amc "myNewMaskConfig" exoSwitchConstraint1;
stacks_image_CE20D2F1-563E-4682-A4EE-C3F024B989B6
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', amc='myNewMaskConfig')
stacks_image_4B376F0B-3729-4EC1-9BBA-8CB6698FDB60
stacks_image_07387D2D-B1B6-454D-8392-DACEDD125BA4
-removeMaskConfig (-rmc)

Removes the mask configuration with the input name.

Example Command Code:
stacks_image_89E81D3D-8090-4076-B15C-262BAC127B8B
exoSwitchConstraint -rmc "myNewMaskConfig" exoSwitchConstraint1;
stacks_image_0AB675FD-066C-46DD-B291-FDEF7619A1E5
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', rmc='myNewMaskConfig')
stacks_image_9BDF5D14-D34B-45BF-BE09-2B537462F35E
stacks_image_1F7A7E74-7700-4E4F-83A6-FF44E6440C63
-setMaskConfig (-smc)

Sets the constraint system to the mask config given in the string input.

Example Command Code:
stacks_image_DAC0F950-528D-4DF4-A643-222C9BDF4D97
exoSwitchConstraint -smc "myMaskConfig" exoSwitchConstraint1;
stacks_image_7674892D-6DE9-41F6-B058-08A9068AD88D
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', smc='myMaskConfig')
stacks_image_E0F7848C-FB18-4F96-BC1D-562E570950C2
stacks_image_43A97A74-E0D7-47D1-A422-94E9BB6088B0
-plugNumber (-pn)

Given a string for a node connected to a constraint system return the plug number.

Example Command Code:
stacks_image_A05769B3-838C-4B01-AC40-91039A49A0CE
exoSwitchConstraint -q -plugNumber "locator1" exoSwitchConstraint1;
stacks_image_259832CB-D130-40A8-8CC6-C9DBBA47A870
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, plugNumber='locator1')
stacks_image_8064FBF2-8D59-4CC6-8CFB-D68857657730
stacks_image_8DA6E0B0-77BF-4A08-9821-AD3DE0A1DCA7
-isNodeConnected (-inc)

Given a string for a node return the name of the connected constraint. If the node is not connected to an exoSwitchConstraint return nothing.

Example Command Code:
stacks_image_B883C1F4-11B7-4F9B-83D7-D4B07A7499A7
exoSwitchConstraint -q -isNodeConnected "locator1" exoSwitchConstraint1;
stacks_image_3B5867E1-6E88-4519-B5F7-88BD3B43DF84
import maya.cmds as cmds
cmds.exoSwitchConstraint('exoSwitchConstraint1', q=True, isNodeConnected='locator1')
stacks_image_EF977BEE-BD68-41D3-9A54-A2C14AB0D951
Command Mode
stacks_image_68BD8D32-9BFA-4BF1-937E-D9C71F5DC957
Edit Mode
stacks_image_1E8D577D-08C0-4A12-A70A-73C47199F20D
Query Mode
© 2010 Exotools Inc. Contact Us