ジャンプ先: 概要. 戻り値. フラグ. Python 例.
colorIndex(
int [float float float]
, [hueSaturationValue=boolean], [resetToFactory=boolean], [resetToSaved=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
colorIndex は、取り消し可能、照会可能、および編集不可能です。
このインデックスはカラー パレットのカラー インデックスを指定します。R、G、B の値(0-1)は、カラーの RGB 値(または -hsv フラグ使用の場合は HSV 値)を指定します。
| int | 成功時に 1 を返します。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
hueSaturationValue(hsv)
|
boolean
|
|
||
|
||||
resetToFactory(rf)
|
boolean
|
|
||
|
||||
resetToSaved(rs)
|
boolean
|
|
||
|
||||
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 )