移動先: 概要 戻り値 キーワード. フラグ. Python 例.
polyColorSet([allColorSets=boolean], [clamped=boolean], [colorSet=string], [copy=boolean], [create=boolean], [currentColorSet=boolean], [currentPerInstanceSet=boolean], [delete=boolean], [newColorSet=string], [perInstance=boolean], [rename=boolean], [representation=string], [shareInstances=boolean], [unshared=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
polyColorSet は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
カラー セットに次の操作を実行します。
- 既存のカラー セットを削除
- 既存のカラー セットの名前を変更
- 空のカラー セットを新規作成
- 既存のカラー セットをカレント カラー セットに設定
- インスタンス間での、インスタンス単位のカラー セットの共有を修正
- カレント カラー セットを照会
- すべてのカラー セットの名前を照会
- すべてのカラー セットの名前と、代表値またはクランプ値を照会
- カレント カラー セットの代表値またはクランプ値を照会
戻り値の型は照会モードでは照会フラグが基になります。
poly, colorSet, currentColorSet, renameColorSet, deleteColorSet, copyColorSet, createColorSet
allColorSets, clamped, colorSet, copy, create, currentColorSet, currentPerInstanceSet, delete, newColorSet, perInstance, rename, representation, shareInstances, unshared
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
# To set the current color set to be "color2".
cmds.polyColorSet(currentColorSet=True, colorSet= 'color2' )
# To query the current color set.
cmds.polyColorSet( query=True, currentColorSet=True )
# To create a per-instance color set family with one set member
# per selected instance.
cmds.polyColorSet(create=True,colorSet='perInst',perInstance=True,unshared=True)
# To create a per-instance color set family with one set member
# for all selected instances.
cmds.polyColorSet(create=True,colorSet='perInst',perInstance=True)
# To rename a currently existing color set from "color3" to "color4".
cmds.polyColorSet( rename=True, colorSet= 'color3', newColorSet= 'color4' )
# Rename the current color set (if any) to "color3".
cmds.polyColorSet( rename=True, newColorSet= 'color3')
# To delete a currently existing color set "color3".
cmds.polyColorSet( delete= True, colorSet= 'color3')
# To delete the current color set (if any)
cmds.polyColorSet( delete=True )
# Copy values of color set "color1" to "color2"
# Note if the second color set exist it will be overwriten by
# the copy. Leaving the destination color blank and the command
# will generate a new unique name based on the source name.
cmds.polyColorSet( copy= True, colorSet='color1', newColorSet ='color2')
# Copy values of the current color set to "color2"
cmds.polyColorSet( copy= True, newColorSet='color2')
# Make a copy of "color1" to a new color set. The
# name of which is automatically generated and returned.
cmds.polyColorSet( copy= True, colorSet='color1' )
# Create a new empty color set
cmds.polyColorSet( create=True, colorSet='newColor')
# To query all of the color sets
cmds.polyColorSet( query=True, allColorSets=True )
# To query all of the color set names and their representation values
cmds.polyColorSet( query=True, allColorSets=True, representation=True )
# To query the clamped value of the current color set
cmds.polyColorSet( query=True, currentColorSet=True, clamped=True )