Show frames
Go to: Synopsis. Return value. Flags. Python examples.
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.
None
In query mode, return type is based on queried flag.
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
|
|
|
Activates or deactivates the mode to adujst the brush size by dragging.
|
|
adjustOpacity(aop)
|
boolean
|
|
|
Activates or deactivates the mode to adujst the brush opacity by dragging.
|
|
arrowOptions(ao)
|
[int, int]
|
|
|
Set the arrow options. The arguments are size, opacity.
|
|
arrowTool(at)
|
boolean
|
|
|
Activates the arrow tool.
When queried, returns true if the arrow tool is active.
|
|
brushOptions(bo)
|
[int, int, int, int, int]
|
|
|
Sets the brush options. The arguments in order are size, opacity, hardness
pressure opacity, pressure size.
|
|
brushTool(bt)
|
boolean
|
|
|
Activates the brush tool.
When queried, returns true if the brush tool is active.
|
|
draw(d)
|
boolean
|
|
|
Activates the drawing tool context.
When queried, returns true if the drawing tool context is active.
|
|
drawColor(dc)
|
[int, int, int]
|
|
|
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]
|
|
|
Sets the ellipse options. The arguments are size, opacity.
|
|
ellipseTool(elt)
|
boolean
|
|
|
Activates the ellipse tool.
When queried, returns true if the ellipse tool is active.
|
|
eraserOptions(eo)
|
[int, int, int, int, int]
|
|
|
Sets the brush options. The arguments in order are size, opacity, hardness
pressure opacity, pressure size.
|
|
eraserTool(et)
|
boolean
|
|
|
Activates the eraser tool.
When queried, returns true if the eraser tool is active.
|
|
ghostColorNext(gcn)
|
[int, int, int]
|
|
|
Sets the color for the ghosts of next frames.
|
|
ghostColorOverride(gco)
|
boolean
|
|
|
Activates or deactivates the color override for the ghosts.
|
|
ghostColorPrevious(gcp)
|
[int, int, int]
|
|
|
Sets the color for the ghosts of previous frames.
|
|
ghostNext(gn)
|
boolean
|
|
|
Activates or deactivates the ghosting of next frames.
|
|
ghostNextCount(gnc)
|
int
|
|
|
Sets the number of ghosts of next frames.
|
|
ghostPrevious(gp)
|
boolean
|
|
|
Activates or deactivates the ghosting of previous frames.
|
|
ghostPreviousCount(gpc)
|
int
|
|
|
Sets the number of ghosts of previous frames.
|
|
layerManager(lm)
|
boolean
|
|
|
Shows the layer manager by showing the tool settings window.
Query returns if the layer manager is shown.
|
|
layerProperties(lp)
|
boolean
|
|
|
Show the layer properties dialog.
|
|
lineOptions(lo)
|
[int, int]
|
|
|
Sets the line options. The arguments are size, opacity.
|
|
lineTool(lt)
|
boolean
|
|
|
Activates the line tool.
When queried, returns true if the line tool is active.
|
|
pencilOptions(po)
|
[int, int, int, int]
|
|
|
Sets the pencil options. The arguments in order are size, opacity,
pressure opacity, pressure size.
|
|
pencilTool(pt)
|
boolean
|
|
|
Activates the pencil tool.
When queried, returns true if the pencil tool is active.
|
|
rectangleOptions(ro)
|
[int, int]
|
|
|
Sets the rectangle options. The arguments are size, opacity.
|
|
rectangleTool(rt)
|
boolean
|
|
|
Activates the rectangle tool.
When queried, returns true if the rectangle tool is active.
|
|
refreshLayerManager(rlm)
|
boolean
|
|
|
Refresh the layer manager.
|
|
refreshTimelineDisplay(rtd)
|
boolean
|
|
|
Refresh the timeline display frames.
|
|
resetTool(r)
|
boolean
|
|
|
Restore tool settings to default values.
|
|
textFontFamily(tff)
|
string
|
|
|
Sets the text font family.
|
|
textOptions(txo)
|
[int, int, string]
|
|
|
Sets the text options. The arguments in order are size, opacity, font family name.
|
|
textTool(tt)
|
boolean
|
|
|
Activates the text tool.
When queried, returns true if the text tool is active.
|
|
timelineFrameDisplay(tfd)
|
int
|
|
|
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
|
|
|
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.
|
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)