ジャンプ先: 概要. 戻り値. フラグ. Python 例.

概要

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])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

bluePencilUtil は、取り消し可能、照会可能、および編集可能です。

Blue Pencil ツールのユーティリティ コマンド。

戻り値

なし

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

フラグ

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
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
adjustBrushSize(abs) boolean createqueryedit
ドラッグしてブラシ サイズを調整するモードをアクティブまたは非アクティブにします。
adjustOpacity(aop) boolean createqueryedit
ドラッグしてブラシの不透明度を調整するモードをアクティブまたは非アクティブにします。
arrowOptions(ao) [int, int] createqueryedit
矢印のオプションを設定します。引数は size、opacity です。
arrowTool(at) boolean createqueryedit
矢印ツールをアクティブにします。照会すると、矢印ツールがアクティブな場合は true を返します。
brushOptions(bo) [int, int, int, int, int] createqueryedit
ブラシのオプションを設定します。引数の順序は、size、opacity、hardness pressure opacity、pressure size です。
brushTool(bt) boolean createqueryedit
ブラシ ツールをアクティブにします。照会すると、ブラシ ツールがアクティブな場合は true を返します。
draw(d) boolean createqueryedit
描画ツール コンテキストをアクティブにします。照会すると、描画ツール コンテキストがアクティブな場合は true を返します。
drawColor(dc) [int, int, int] createqueryedit
現在の描画カラーを設定します。カラー フォーマットは 0 ~ 255 の値を持つ RGB です。照会すると、現在の描画カラーを返します。
ellipseOptions(elo) [int, int] createqueryedit
楕円オプションを設定します。引数は size、opacity です。
ellipseTool(elt) boolean createqueryedit
楕円ツールをアクティブにします。照会すると、楕円ツールがアクティブな場合は true を返します。
eraserOptions(eo) [int, int, int, int, int] createqueryedit
ブラシのオプションを設定します。引数の順序は、size、opacity、hardness pressure opacity、pressure size です。
eraserTool(et) boolean createqueryedit
消しゴム ツールをアクティブにします。照会すると、消しゴムツールがアクティブな場合は true を返します。
ghostColorNext(gcn) [int, int, int] createqueryedit
次のフレームのゴーストのカラーを設定します。
ghostColorOverride(gco) boolean createqueryedit
ゴーストのカラーのオーバーライドをアクティブまたは非アクティブにします。
ghostColorPrevious(gcp) [int, int, int] createqueryedit
前のフレームのゴーストのカラーを設定します。
ghostNext(gn) boolean createqueryedit
次のフレームのゴースト化をアクティブまたは非アクティブにします。
ghostNextCount(gnc) int createqueryedit
次のフレームのゴーストの数を設定します。
ghostPrevious(gp) boolean createqueryedit
前のフレームのゴースト化をアクティブまたは非アクティブにします。
ghostPreviousCount(gpc) int createqueryedit
前のフレームのゴーストの数を設定します。
layerManager(lm) boolean createqueryedit
ツール設定ウィンドウを表示してレイヤ マネージャを表示します。照会すると、レイヤ マネージャを表示するかどうかを返します。
layerProperties(lp) boolean createqueryedit
[レイヤのプロパティ](Layer Properties)ダイアログ ボックスを表示します。
lineOptions(lo) [int, int] createqueryedit
線のオプションを設定します。引数は size、opacity です。
lineTool(lt) boolean createqueryedit
ライン ツールをアクティブにします。照会すると、ライン ツールがアクティブな場合は true を返します。
pencilOptions(po) [int, int, int, int] createqueryedit
鉛筆のオプションを設定します。引数の順序は、size、opacity、pressure opacity、pressure size です。
pencilTool(pt) boolean createqueryedit
鉛筆ツールをアクティブにします。照会すると、鉛筆ツールがアクティブな場合は true を返します。
rectangleOptions(ro) [int, int] createqueryedit
長方形のオプションを設定します。引数は size、opacity です。
rectangleTool(rt) boolean createqueryedit
長方形ツールをアクティブにします。照会すると、長方形ツールがアクティブな場合は true を返します。
refreshLayerManager(rlm) boolean createqueryedit
レイヤ マネージャを更新します。
refreshTimelineDisplay(rtd) boolean createqueryedit
タイムライン表示フレームを更新します。
resetTool(r) boolean createqueryedit
ツール設定を既定値に戻します。
textFontFamily(tff) string createqueryedit
文字のフォント ファミリを設定します。
textOptions(txo) [int, int, string] createqueryedit
テキストのオプションを設定します。引数の順序は、size、opacity、font family name です。
textTool(tt) boolean createqueryedit
テキスト ツールをアクティブにします。照会すると、テキスト ツールがアクティブな場合は true を返します。
timelineFrameDisplay(tfd) int createqueryedit
タイムラインの Blue Pencil フレームの表示モードを設定します。
モード:
  • 0 = 常に表示
  • 1 = コンテキストがアクティブなときに表示
  • 2 = 非表示
transform(t) boolean createqueryedit
トランスフォーム ツールのコンテキストをアクティブにします。照会すると、トランスフォーム ツールのコンテキストがアクティブな場合は true を返します。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

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)