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

Synopsis

bluePencilLayer [-active int] [-addLayer] [-count] [-delete int] [-deleteAll] [-editLocked boolean int] [-editName string int] [-editOpacity float int] [-editState int int] [-editVis boolean int] [-insert int] [-layerState int int] [-move int int] [-moveAll] [-name string int] [-newCamera string] [-queryLocked int] [-queryName int] [-queryOpacity int] [-queryState int] [-queryVis int]

bluePencilLayer is undoable, queryable, and editable.

Command to manage blue pencil layers. The command requires a camera name as argument.

Return value

None

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

Flags

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 createqueryedit
Sets the active layer index. Query returns the active layer index.
-addLayer(-add)
Creates a new layer.
-count(-cnt)
Returns the number of layers.
-delete(-del) int
Removes the layer at the specified index.
-deleteAll(-da)
Removes all layers.
-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)
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 be used more than once in a command.

MEL examples

// Set the active layer to index 3 on camera perspective1.
bluePencilLayer -active 3 "perspective1";

// Get the number of layers for perspective1.
bluePencilLayer -count "perspective1";

// Create layer.
bluePencilLayer -addLayer -name "newLayerName" -layerState 1 "perspective1";
bluePencilLayer -insert 3 -name "newLayerName" -layerState 0 "perspective1";

// Remove layer.
bluePencilLayer -delete 3 "perspective1";
bluePencilLayer -deleteAll "perspective1";

// Move layer.
bluePencilLayer -move 3 6 -newCamera "top" "perspective1";
bluePencilLayer -moveAll "top" "perspective1";

// Rename layer.
bluePencilLayer -editName "newLayerName" 3 "perspective1";

// Query layer info.
bluePencilLayer -queryName 3 "perspective1";
bluePencilLayer -queryVis 3 "perspective1";
bluePencilLayer -queryOpacity 3 "perspective1";
bluePencilLayer -queryState 3 "perspective1";
bluePencilLayer -queryLocked 3 "perspective1";

// Set layer info.
bluePencilLayer -editName "newName" 3 "perspective1";
bluePencilLayer -editVis 0 3 "perspective1";
bluePencilLayer -editOpacity 0.5 3 "perspective1";
bluePencilLayer -editState 1 3 "perspective1";
bluePencilLayer -editLocked 1 3 "perspective1";