移動先: 概要 戻り値 フラグ Python の例
colorIndex(
int [float float float]
, [hueSaturationValue=boolean], [resetToFactory=boolean], [resetToSaved=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
colorIndex は「元に戻す」が可能、「照会」が可能、「編集」が不可能です。
このインデックスはカラー パレットのカラー インデックスを指定します。
R、G、B の値(0-1)は、カラーの RGB 値(または -hsv フラグ使用の場合は HSV 値)を指定します。
戻り値の型は照会モードでは照会フラグが基になります。
hueSaturationValue, resetToFactory, resetToSaved
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
# Set the first entry in the color palette to have RGB values 1 0 0 - red.
cmds.colorIndex( 1, 1, 0, 0 )
# Set the first entry in the color palette to have HSV values 360 1 1 - red.
cmds.colorIndex( 1, 360, 0, 0, hsv=True )
# Return the RGB color values of the first entry of the color palette.
cmds.colorIndex( 1, q=True )
# Return the HSV color values of the first entry of the color palette.
cmds.colorIndex( 1, q=True, hsv=True )