color(
[objects]
, [userDefined=int])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
color は 「元に戻す」が可能、「照会」が不可能、「編集」が不可能 です。
このコマンドは、指定したオブジェクトの固定ワイヤフレーム カラーを設定してそのオブジェクトのクラス カラーにするか、または、-ud/userDefined フラグを指定している場合はユーザ定義カラーの 1 つを設定します。なし
ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
---|---|---|---|---|
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 ) # set the wireframe color of the sphere back to its default color cmds.color( 'sphere1' )