ジャンプ先: 概要. 戻り値. キーワード. フラグ. 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 )