ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
polyBlendColor([baseColorName=string], [blendFunc=int], [blendWeightA=float], [blendWeightB=float], [blendWeightC=float], [blendWeightD=float], [caching=boolean], [constructionHistory=boolean], [dstColorName=string], [name=string], [nodeState=int], [srcColorName=string])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
polyBlendColor は、取り消し可能、照会可能、および編集可能です。
2 つのカラー セットを取ってブレンドし、指定された 3 番目のカラー セットにします。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
polyColorMod, polyColorPerVertex, polyColorSet
baseColorName, blendFunc, blendWeightA, blendWeightB, blendWeightC, blendWeightD, caching, constructionHistory, dstColorName, name, nodeState, srcColorName
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# This example creates two poly color sets for pPlane1.
# Apply red and green to the vertices of pPlane1 using two separate color sets, then blend their colors to the second color set
# After that, delete the first color set
# Create a poly plane pPlane1
cmds.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')
# Create colorSet1, set to use RGBA channels
cmds.polyColorSet(create=True, clamped=0, rpt='RGBA', colorSet='colorSet1')
# Apply red color to the vertices of pPlane1
cmds.polyColorPerVertex(r=1, g=0, b=0, a=1, cdo=True)
# Create colorSet2, set to use RGBA channels
cmds.polyColorSet(create=True, clamped=0, rpt='RGBA', colorSet='colorSet2')
# Apply green color to the vertices of pPlane1
cmds.polyColorPerVertex(r=0, g=1, b=0, a=1, cdo=True)
# Blend the two color sets to colorSet2, set to use ColorChannel blend style, set all the blend weights to 0.5
cmds.polyBlendColor(bcn='colorSet1', src='colorSet2', dst='colorSet2', bfn=6, bwa=0.5, bwb=0.5, bwc=0.5, bwd=0.5)
# Delete colorSet1
cmds.polyColorSet(delete=True, colorSet='colorSet1')