Skip to main content

Keyframe Pro 2 Documentation

Configuring Maya Tools

In order for Keyframe Pro 2 to send commands to Maya, a commandPort must be opened by Maya.

This is an operation that occurs inside of Maya using the commandPort command.

commandPort Script

The following Python snippet can be used to open a commandPort in Maya. This script can be executed in Maya's script editor, as a shelf button or automatically when Maya launches as part of userSetup.py:

import maya.cmds as cmds
cmds.commandPort(name=":20240")

Note: The default commandPort used by Keyframe Pro 2 is 20240 however this can be changed in the Preferences.

Opening a commandPort Automatically on Startup

To automatically open a commandPort when Maya launches add the code to userSetup.py:

  1. In the Maya scripts directory create a file named "userSetup.py" (if it doesn't exist)
  2. Open the file in a text editor
  3. Add the Python code snippet provided above
  4. Restart Maya