Komotion for Maya
Node Naming and Custom Name Schemes

 
 
 

Komotion for Maya v1.2.6 and onwards allows users to modify the Komotion Node naming format with the 'komotionForMayaInit.py' script file.

The key use cases are for fitting Komotion into pipelines with established naming conventions, and game engine exports.

Below are the steps for configuring custom node naming, and the precautions that need to be taken for custom node naming:

 

1. Ensure that Maya is not running.

2. Navigate to the 'scripts' folder under the directory path: Users\[USERNAME]\Documents\maya\20XX

Note:

  • '[USERNAME]' being your current Windows User Account, and;

  • '20XX' refers to the version of Maya you're using with Komotion.

NewItem378.png
 

3. Open the 'komotionForMayaInit.py' script with a text editor.

NewItem379.png
 

Komotion UUID

The only use of these UUIDs is for node naming during Skeleton Creation. Komotion allows users to create multiple rigs and chains with the same name and configuration. Therefore, to prevent naming conflicts during Maya node creation (which happens during Skeleton Creation), a UUID or similar is appended to the name format. These UUIDs have no relation to the UUID attribute all Maya Nodes have.

The Generate() method in the KomotionUUID class is called to generate the unique IDs during the Chain Creation process.

  • uuid.uuid4()

    • Default unique ID used in v1.2.5 and earlier

    • Virtually guaranteed safety against name conflicts

    • Very long and not suitable for all pipelines

  • random.choice()

    • Default used in v1.2.6 and later

    • High safety against name conflicts with a reasonable length

    • Balance between length and minimising conflicts

  • Custom and/or No UUID

    • Should only be used if users are confident name conflicts will not happen

    • Only recommended for custom studio pipelines, and advanced use cases

    • TDs and Riggers should closely determine requirements

 

KomotionNodeName

In the KomotionNodeName class, the static methods correspond directly to each of the Komotion Node Names in the Node Reference, generating the string names for those.

The only exception is the KRT_ChangeObjOnePassThrough method which is invoked and used for chain renaming.

Komotion for Maya does not have any hard-coded or particularly strict naming conventions, or naming contracts. It’s very open, and the core back-end logic works from node selection, node attributes, and Maya Node UUIDs. At the rigs and chains level, internally generated GUIDs are used instead of the rig/chain/node names, meaning users have the freedom to rename and change these on-the-fly (as well as Chain Configuration, such as the Chain Creation and Mirror Directions).

There’s one technical limitation where the values passed through for the ‘ChainNodeTypeStr’ parameter for the ‘KRT_ChangeObjOnePassThrough’ method in ‘komotionForMayaInit.py’ are hard-coded to correspond directly to the Komotion Node Name types (‘_TRANS_’, ‘_TRANX_’, ‘_WEIGHT_’ etc.) that you see in the static methods, and as documented in the Komotion Node Reference manual.