pymel.core.animation.buildKeyframeMenu

buildKeyframeMenu(*args, **kwargs)

This command handles building the dynamicKeyframe menu, to show attributes of currently selected objects, filtered by the current manipulator. menuName is the string returned by the menucommand. The target menu will entries appended to it (and deleted from it) to always show what’s currently keyframable.

Derived from mel command maya.cmds.buildKeyframeMenu

Example:

import pymel.core as pm

# Set up "myAttributeMenu" as a menu to always
# reflect what's currently keyframable.
#
pm.buildKeyframeMenu( 'myAttributeMenu' )