MEL (1.5+)

Command (MEL)

bluePencil

Return Value

Return type is based on flags

Flags

Long name (short name) Arguement types Properties
-draw (-d) C
Activates the Blue Pencil drawing tool.
-createAndDraw (-cad) C
Creates the Blue Pencil node (drawing surface) and activates the drawing tool.
-widthHeight (-wh) int  int C Q
Specifies the width and height of the drawing surface at creation time.
-exists (-ex) C
Checks if any Blue Pencil nodes exists. Returns true/false.
-allLayers (-all) C
Returns the layer IDs for all layers.
-activeLayer (-al) int C
Sets the active layer by layer ID.
-layerId (-lid) Q
Query the active layer ID. Combine with other flags to operate on a specific layer.
-name (-n) string C Q E
Sets the layer name. Defaults to active layer if -lid flag not used (query/edit).
-type (-typ) string C Q
Sets the layer type ("anim", "draw" or "fill").
-visible (-vis) boolean Q E
Edit or query the layer visibility.
-fillColor (-fillColor) int  int  int Q E
Sets the color of a fill layer.
-imagePath (-ip) string Q E
Sets the image path of a fill layer.
-layerOpacity (-lo) int C
Sets the layer opacity (range 0-255).
-reorderLayer (-rol) int  int C
Changes the position of a layer relative to another layer.
-camera (-cam) string C Q E
Sets the camera a layer is assigned to.
-switchCamera(-sc) string  string C
Assign all layers from camera 'X' to camera 'Y'.
-drawColor (-dc) int int int C
Sets the draw color (red, green, blue).
-clear (-cl) C
Removes all drawing data from the current keyframe (anim layer) or layer (draw layer).
-deleteLayer (-dl) C
Deletes a layer. Active layer is deleted if layer ID flag is not provided.
-deleteAll (-da) C
Removes all Blue Pencil data from the Maya scene.
-blankKey (-b) C
Inserts a blank key. If the time flag is not used, the key will be created at the current time.
-duplicateKey (-dup) C
Inserts a duplicate key. If the time flag is not used, the key will be created at the current time.
-deleteKey (-dk) C
Removes key. If the time flag is not used, the key at the current time will be removed.
-cutKey (-ck) C
Cuts the key and copy the drawing data to the clipboard.
-copyKey (-cpk) C
Copies drawing data to the clipboard.
-pasteKey (-pk) C
Creates a key and copies the clipboard contents to it.
-time (-t) time C
The time at which a key operation will occur.
-lightbox (-lb) int  int C
Sets the number of pre and post keys to be displayed when the lightbox is enabled.
-lightboxPreEnable (-pre) boolean C  Q
Enable/disable the lightbox for keys prior to the current key.
-lightboxPostEnable (-pst) boolean C  Q
Enable/disable the lightbox for keys after the current key.
-tool (-tl) int C
Sets the current tool. Pencil Tool=0, Brush Tool=1, Eraser Tool=2, Eyedropper=3.
-pencilOptions (-po) int  int  boolean C
Sets the pencil options (diameter, opacity, tabletPressureEnabled).
-brushOptions (-bo) int  int  int  int  boolean C
Sets the brush options (diameter, opacity, flow, hardness, tabletPressureEnabled).
-eraserOptions (-eo) int  int  int  int  boolean C
Sets the eraser options (diameter, opacity, flow, hardness, tabletPressureEnabled).
-newLayerDialog (-nld) C
Displays the New Layer dialog.
-toolboxDialog (-td) C
Displays the Toolbox dialog.
-toolOptionsDialog (-tod) C
Displays the Tool Options dialog.
-layersDialog (-lad) C
Displays the Layer Manager.
-layerProperties (-lp) C
Displays the Layer Properties dialog.
-retimingToolDialog (-rtd) C
Displays the Retiming Tool.
-colorPaletteDialog (-cpd) C
Displays the Color Palette.
-drawColorDialog (-dcd) C
Displays the draw color picker dialog.
-lightboxDialog (-lbd) C
Displays the Lightbox Settings dialog.
-preferences (-pr) C
Displays the Preferences dialog.
-about(-ab) C
Displays the About dialog.
-floatingViewport(-fv) C
Creates a floating viewport and assigns the bluePencilCam camera to it.
-transformTool (-trs) C
Activates the Transform Tool.
-convert (-con) C
Converts legacy 1.0 nodes to 1.5 nodes.