Show frames

Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

bluePencilUtil([adjustBrushSize=boolean], [adjustOpacity=boolean], [arrowOptions=[int, int]], [arrowTool=boolean], [brushOptions=[int, int, int, int, int]], [brushTool=boolean], [draw=boolean], [drawColor=[int, int, int]], [ellipseOptions=[int, int]], [ellipseTool=boolean], [eraserOptions=[int, int, int, int, int]], [eraserTool=boolean], [ghostColorNext=[int, int, int]], [ghostColorOverride=boolean], [ghostColorPrevious=[int, int, int]], [ghostNext=boolean], [ghostNextCount=int], [ghostPrevious=boolean], [ghostPreviousCount=int], [layerManager=boolean], [layerProperties=boolean], [lineOptions=[int, int]], [lineTool=boolean], [pencilOptions=[int, int, int, int]], [pencilTool=boolean], [rectangleOptions=[int, int]], [rectangleTool=boolean], [refreshLayerManager=boolean], [refreshTimelineDisplay=boolean], [resetTool=boolean], [textFontFamily=string], [textOptions=[int, int, string]], [textTool=boolean], [timelineFrameDisplay=int], [transform=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

bluePencilUtil is undoable, queryable, and editable.

Utility commands for blue pencil tool.

Return value

None

In query mode, return type is based on queried flag.

Flags

adjustBrushSize, adjustOpacity, arrowOptions, arrowTool, brushOptions, brushTool, draw, drawColor, ellipseOptions, ellipseTool, eraserOptions, eraserTool, ghostColorNext, ghostColorOverride, ghostColorPrevious, ghostNext, ghostNextCount, ghostPrevious, ghostPreviousCount, layerManager, layerProperties, lineOptions, lineTool, pencilOptions, pencilTool, rectangleOptions, rectangleTool, refreshLayerManager, refreshTimelineDisplay, resetTool, textFontFamily, textOptions, textTool, timelineFrameDisplay, transform
Long name (short name) Argument types Properties
adjustBrushSize(abs) boolean createqueryedit
Activates or deactivates the mode to adujst the brush size by dragging.
adjustOpacity(aop) boolean createqueryedit
Activates or deactivates the mode to adujst the brush opacity by dragging.
arrowOptions(ao) [int, int] createqueryedit
Set the arrow options. The arguments are size, opacity.
arrowTool(at) boolean createqueryedit
Activates the arrow tool. When queried, returns true if the arrow tool is active.
brushOptions(bo) [int, int, int, int, int] createqueryedit
Sets the brush options. The arguments in order are size, opacity, hardness pressure opacity, pressure size.
brushTool(bt) boolean createqueryedit
Activates the brush tool. When queried, returns true if the brush tool is active.
draw(d) boolean createqueryedit
Activates the drawing tool context. When queried, returns true if the drawing tool context is active.
drawColor(dc) [int, int, int] createqueryedit
Sets the current drawing color. Color format is RGB with values from 0-255. When queried, returns the current drawing color.
ellipseOptions(elo) [int, int] createqueryedit
Sets the ellipse options. The arguments are size, opacity.
ellipseTool(elt) boolean createqueryedit
Activates the ellipse tool. When queried, returns true if the ellipse tool is active.
eraserOptions(eo) [int, int, int, int, int] createqueryedit
Sets the brush options. The arguments in order are size, opacity, hardness pressure opacity, pressure size.
eraserTool(et) boolean createqueryedit
Activates the eraser tool. When queried, returns true if the eraser tool is active.
ghostColorNext(gcn) [int, int, int] createqueryedit
Sets the color for the ghosts of next frames.
ghostColorOverride(gco) boolean createqueryedit
Activates or deactivates the color override for the ghosts.
ghostColorPrevious(gcp) [int, int, int] createqueryedit
Sets the color for the ghosts of previous frames.
ghostNext(gn) boolean createqueryedit
Activates or deactivates the ghosting of next frames.
ghostNextCount(gnc) int createqueryedit
Sets the number of ghosts of next frames.
ghostPrevious(gp) boolean createqueryedit
Activates or deactivates the ghosting of previous frames.
ghostPreviousCount(gpc) int createqueryedit
Sets the number of ghosts of previous frames.
layerManager(lm) boolean createqueryedit
Shows the layer manager by showing the tool settings window. Query returns if the layer manager is shown.
layerProperties(lp) boolean createqueryedit
Show the layer properties dialog.
lineOptions(lo) [int, int] createqueryedit
Sets the line options. The arguments are size, opacity.
lineTool(lt) boolean createqueryedit
Activates the line tool. When queried, returns true if the line tool is active.
pencilOptions(po) [int, int, int, int] createqueryedit
Sets the pencil options. The arguments in order are size, opacity, pressure opacity, pressure size.
pencilTool(pt) boolean createqueryedit
Activates the pencil tool. When queried, returns true if the pencil tool is active.
rectangleOptions(ro) [int, int] createqueryedit
Sets the rectangle options. The arguments are size, opacity.
rectangleTool(rt) boolean createqueryedit
Activates the rectangle tool. When queried, returns true if the rectangle tool is active.
refreshLayerManager(rlm) boolean createqueryedit
Refresh the layer manager.
refreshTimelineDisplay(rtd) boolean createqueryedit
Refresh the timeline display frames.
resetTool(r) boolean createqueryedit
Restore tool settings to default values.
textFontFamily(tff) string createqueryedit
Sets the text font family.
textOptions(txo) [int, int, string] createqueryedit
Sets the text options. The arguments in order are size, opacity, font family name.
textTool(tt) boolean createqueryedit
Activates the text tool. When queried, returns true if the text tool is active.
timelineFrameDisplay(tfd) int createqueryedit
Sets the display mode for blue pencil frames in the timeline.
Modes:
  • 0 Show always
  • 1 Show when context is active
  • 2 Hide
transform(t) boolean createqueryedit
Activates the transform tool context. When queried, returns true if the transform tool context is active.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Activate the drawing tool context.
cmds.bluePencilUtil(draw=True)

# Activate the transform tool context.
cmds.bluePencilUtil(transform)

# Set the draw color to red.
cmds.bluePencilUtil(drawColor=[255, 0, 0])

# Activate tool.
cmds.bluePencilUtil(pencilTool=True)
cmds.bluePencilUtil(brushTool=True)
cmds.bluePencilUtil(eraserTool=True)
cmds.bluePencilUtil(lineTool=True)
cmds.bluePencilUtil(arrowTool=True)
cmds.bluePencilUtil(ellipseTool=True)
cmds.bluePencilUtil(rectangleTool=True)
cmds.bluePencilUtil(textTool=True)

# Start adjusting the brush size.
cmds.bluePencilUtil(adjustBrushSize=True)

# Stop adjusting the brush size.
cmds.bluePencilUtil(adjustBrushSize=False)

# Adjust opacity.
cmds.bluePencilUtil(adjustOpacity=True)

# Set pencil options size: 10, opacity 25, pressure size: 35, pressure opacity: 45.
cmds.bluePencilUtil(pencilOptions=[10, 25, 35, 45])

# Set pencil options size: 10, opacity 25, hardness: 30,
# pressure size: 35, pressure opacity: 45.
cmds.bluePencilUtil(brushOptions=[10, 25, 30, 35, 45])
cmds.bluePencilUtil(eraserOptions=[10, 25, 30, 35, 45])
cmds.bluePencilUtil(lineOptions=[10, 25])
cmds.bluePencilUtil(arrowOptions=[10, 25])
cmds.bluePencilUtil(ellipseOptions=[10, 25])
cmds.bluePencilUtil(rectangleOptions=[10, 25])

# Set the text options, size: 12, opacity: 25, font: Arial
cmds.bluePencilUtil(textOptions=[12, 25, 'Arial'])
cmds.bluePencilUtil(textFontFamily='Arial')

# Activate ghosting
cmds.bluePencilUtil(ghostPrevious=True)
cmds.bluePencilUtil(ghostNext=True)

# Set the number of ghosts.
cmds.bluePencilUtil(ghostPreviousCount=5)
cmds.bluePencilUtil(ghostNextCount=5)

# Set the ghost color.
cmds.bluePencilUtil(ghostColorOverride=True)
cmds.bluePencilUtil(ghostColorPrevious=[0, 0, 255])
cmds.bluePencilUtil(ghostColorNext=[255, 255, 0])

# Refresh timeline.
cmds.bluePencilUtil(refreshTimelineDisplay=True)

# Show layer manager.
cmds.bluePencilUtil(layerManager=True)

# Refresh layer manager.
cmds.bluePencilUtil(refreshLayerManager=True)

# Show layer properties.
cmds.bluePencilUtil(layerProperties=True)

# Reset blue pencil tool settings.
cmds.bluePencilUtil(resetTool=True)