移動先: 概要 戻り値 フラグ. Python 例.

概要

color( [objects] , [userDefined=int])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

color は 「元に戻す」が可能、「照会」が不可能「編集」が不可能 です。

このコマンドは、指定したオブジェクトの固定ワイヤフレーム カラーを設定してそのオブジェクトのクラス カラーにするか、または、-ud/userDefined フラグを指定している場合はユーザ定義カラーの 1 つを設定します。

戻り値

なし

フラグ

userDefined
ロング ネーム(ショート ネーム) 引数型 プロパティ
userDefined(ud) int create
選択したオブエクトに設定する、ユーザ定義のカラー インデックスを指定します。有効な数値は 1~8 です。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

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