Skip to main content

Keyframe MP Documentation

Maya Tools

Overview

Maya Tools is a small toolset used to communicate with Maya from directly inside Keyframe MP.

The sync functionality provided by Maya Tools allows the current time in Keyframe MP to control Maya's timeline. In combination with the Maya to Keyframe MP script, a two-way timeline sync can be established.

Setup

Before Keyframe MP can communicate with Maya a commandPort must be opened by Maya.

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=":20180")

Note: The default port used by Keyframe MP is 20180 however this can be changed in the Preferences.

Opening a commandPort on Maya Startup

To automatically open a commandPort when Maya starts up 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

Sync

Clicking the Sync button establishes a connection with Maya. If the connection is successful, the Sync button will turn blue and changes to Keyframe Pro's current time will be reflected in Maya.

The Console will display an error message if the connections fails. The connection will fail if Maya is closed, a commandPort is not opened by Maya or one of the applications is blocked by a firewall.

Sync Options

  • Offset
    A fixed number of frames added to, or subtracted from, the current frame passed to Maya.
  • From Range Start
    Use Maya's range start as a relative offset.
  • Multiplier
    Multiply the current frame by this value before sending it to Maya.