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:
-
In the Maya scripts directory create a file named "userSetup.py" (if it doesn't exist)
-
Open the file in a text editor
-
Add the Python code snippet provided above
-
Restart Maya