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

Synopsis

bluePencilNode([camera=string], [exists=boolean], [frame=boolean], [layer=boolean], [layerName=string], [layerState=uint], [refresh=boolean], [refreshGhosting=boolean])

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

bluePencilNode is undoable, queryable, and NOT editable.

Command to create the blue pencil node.

Return value

None

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

Flags

camera, exists, frame, layer, layerName, layerState, refresh, refreshGhosting
Long name (short name) Argument types Properties
camera(c) string createquery
Specifies the camera on which to create a new layer when creating the node. Query returns the name of the active camera.
exists(ex) boolean create
Returns true if the blue pencil node has been created.
frame(f) boolean create
Creates a new frame when creating the new layer when creating the node.
layer(l) boolean create
Create a new layer when creating the node.
layerName(ln) string create
Specifies the layer name of the new layer when creating the node.
layerState(ls) uint create
Specifies the layer state of the new layer. 0: Animated, 1: Static.
refresh(r) boolean create
Refresh the viewport of the active camera.
refreshGhosting(rg) boolean create
Refresh the ghosting information.

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

# Refresh node.
cmds.bluePencilNode(r=True)

# Check if blue pencil node exists.
cmds.bluePencilNode(exists=True)

# Get the active camera name.
cmds.bluePencilNode(q=True, camera=True)

# Create a new node.
cmds.bluePencilNode(layer=True, c=CameraName, ln=LayerName, ls=1, f=True)