Skip to main content

Blue Pencil 2 Documentation

Frame Stepping

Frame stepping is a common technique in 3D animation that allows a user to step directly to the next or previous keyframe.

In Blue Pencil 2, frame stepping can be performed on the active layer though the main menu or by using the built-in MEL commands to create hotkeys or shelf buttons:

Step Forward

czBluePencilFrame -stepForward

Step Back

czBluePencilFrame -stepBack

Hotkeys

Frame stepping hotkeys can be added to Maya using the Hotkey Editor (Windows->Settings/Prefrences/Hotkey Editor)

The MEL commands listed above can be used to create basic hotkeys for frame stepping.

Advanced Hotkey Example

The following example provides MEL scripts that can be used to override the existing native grease pencil frame stepping hotkeys (assigned to Alt+< and Alt+>). These scripts will first check the scene for a Blue Pencil 2 node. If one exists, BP2 frame stepping commands will be called, otherwise, it will fallback to the original commands.

Step Forward (overriding native grease pencil):

if(`pluginInfo -q -loaded "BluePencil2"` && `czBluePencilNode -exists`)
{
    czBluePencilFrame -stepForward;
}
else
{
    NextGreasePencilFrame;
}

Step Back (overriding native grease pencil):

if(`pluginInfo -q -loaded "BluePencil2"` && `czBluePencilNode -exists`)
{
    czBluePencilFrame -stepBack;
}
else
{
    PreviousGreasePencilFrame;
}