Go to: Synopsis. Return value. Flags. Python examples.
bluePencilLayer([active=int], [addLayer=boolean], [count=boolean], [delete=int], [deleteAll=boolean], [editLocked=[boolean, int]], [editName=[string, int]], [editOpacity=[float, int]], [editState=[int, int]], [editVis=[boolean, int]], [insert=int], [layerState=[int, int]], [move=[int, int]], [moveAll=boolean], [name=[string, int]], [newCamera=string], [queryLocked=int], [queryName=int], [queryOpacity=int], [queryState=int], [queryVis=int])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
bluePencilLayer is undoable, queryable, and editable.
Command to manage blue pencil layers. The command requires a camera name as argument.
None
In query mode, return type is based on queried flag.
active, addLayer, count, delete, deleteAll, editLocked, editName, editOpacity, editState, editVis, insert, layerState, move, moveAll, name, newCamera, queryLocked, queryName, queryOpacity, queryState, queryVis
Long name (short name) |
Argument types |
Properties |
|
active(act)
|
int
|
|
|
Sets the active layer index. Query returns the active layer index.
|
|
addLayer(add)
|
boolean
|
|
|
count(cnt)
|
boolean
|
|
|
Returns the number of layers.
|
|
delete(delete)
|
int
|
|
|
Removes the layer at the specified index.
|
|
deleteAll(da)
|
boolean
|
|
|
editLocked(el)
|
[boolean, int]
|
|
|
Edit the layer's locked state.
|
|
editName(en)
|
[string, int]
|
|
|
Sets name of the layer at the specified index.
|
|
editOpacity(eo)
|
[float, int]
|
|
|
Sets the opacity of the layer at the specified index.
|
|
editState(es)
|
[int, int]
|
|
|
Edits the layer's state. 0: animated, 1: static.
|
|
editVis(ev)
|
[boolean, int]
|
|
|
Sets the visibility of the layer at the specified index.
|
|
insert(ins)
|
int
|
|
|
Creates a new layer at the given index.
|
|
layerState(ls)
|
[int, int]
|
|
|
Sets the layer state when adding a new layer. 0: animated, 1: static.
|
|
move(mv)
|
[int, int]
|
|
|
Moves a layer from one index to another.
|
|
moveAll(mva)
|
boolean
|
|
|
Moves all layers from the current camera to the given camera.
|
|
name(n)
|
[string, int]
|
|
|
Sets the name of the new layer when using addLayer or insertLayer.
|
|
newCamera(nc)
|
string
|
|
|
Sets a new camera to move layers to when using the move test.
|
|
queryLocked(ql)
|
int
|
|
|
Query the layer's locked state.
|
|
queryName(qn)
|
int
|
|
|
Returns the specified layer's name.
|
|
queryOpacity(qo)
|
int
|
|
|
Returns the specified layer's opacity.
|
|
queryState(qs)
|
int
|
|
|
Queries the layer's state. 0: animated, 1: static.
|
|
queryVis(qv)
|
int
|
|
|
Returns the specified layer's visibility.
|
|
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
# Set the active layer to index 3 on camera perspective1
cmds.bluePencilLayer("perspective1", active=3)
# Get the number of layers for perspective1.
cmds.bluePencilLayer("perspective1", count=True)
# Create layer.
cmds.bluePencilLayer("perspective1", addLayer=True, name="newLayerName", layerState=1)
cmds.bluePencilLayer("perspective1", insert=3, name="newLayerName", layerState=0)
# Remove layer.
cmds.bluePencilLayer("perspective1", delete=3)
cmds.bluePencilLayer("perspective1", deleteAll=True)
# Move layer.
cmds.bluePencilLayer("perspective1", move=(3, 6), newCamera="top")
cmds.bluePencilLayer("perspective1", moveAll="top")
# Rename layer.
cmds.bluePencilLayer("perspective1", editName=("newLayerName", 3))
# Query layer info.
cmds.bluePencilLayer("perspective1", queryName=3)
cmds.bluePencilLayer("perspective1", queryVis=3)
cmds.bluePencilLayer("perspective1", queryOpacity=3)
cmds.bluePencilLayer("perspective1", queryState=3)
# Set layer info.
cmds.bluePencilLayer("perspective1", editName=("newName", 3))
cmds.bluePencilLayer("perspective1", editVis=(0, 3))
cmds.bluePencilLayer("perspective1", editOpacity=(0.5, 3))
cmds.bluePencilLayer("perspective1", editState=(1, 3))
cmds.bluePencilLayer("perspective1", editLocked=(1, 3))