ジャンプ先: 概要. 戻り値. フラグ. Python 例.
color(
[objects]
, [rgbColor=[float, float, float]], [userDefined=int])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
color は、取り消し可能、照会不可能、および編集不可能です。
このコマンドは、指定したオブジェクトの固定ワイヤフレーム カラーがそのオブジェクトのクラス カラーになるように設定するか、または -ud/userDefined フラグを指定している場合は、ユーザ定義カラーの 1 つを設定します。ユーザが浮動小数点 RGB カラーが必要な場合は、-rgb/rgbColor フラグを指定できます。
なし
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
rgbColor(rgb)
|
[float, float, float]
|
|
||
|
||||
userDefined(ud)
|
int
|
|
||
|
||||
import maya.cmds as cmds # create a sphere and deselect it cmds.sphere( n='sphere1' ) cmds.select( d=True ) # Set the inactive wireframe color of the sphere to the # first user defined color cmds.color( 'sphere1', ud=1 ) # rgb defined color (red) cmds.color( 'sphere1', rgb=(1, 0, 0) ) # set the wireframe color of the sphere back to its default color cmds.color( 'sphere1' )