移動先: 概要 戻り値 関連項目. フラグ. Python 例.

概要

polyBlendColor([caching=boolean], [constructionHistory=boolean], [name=string], [nodeState=int])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

polyBlendColor は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

2 つのカラー セットを取ってブレンドし、指定された 3 番目のカラー セットにします。

戻り値

stringノード名

戻り値の型は照会モードでは照会フラグが基になります。

関連項目

polyColorMod, polyColorPerVertex, polyColorSet

フラグ

caching, constructionHistory, name, nodeState
ロング ネーム(ショート ネーム) 引数型 プロパティ
一般的なフラグ
name(n) string create
作成されるノードに名前をつけます。
constructionHistory(ch) boolean createquery
コンストラクション ヒストリをオンまたはオフにします(適切な場合)。コンストラクション ヒストリがオンの場合、対応するノードがメッシュのヒストリ チェーンに挿入されます。コンストラクション ヒストリがオフの場合、 操作オブジェクト上に直接行われます。
注: コンストラクション ヒストリがすでにオブジェクトにある場合は、 このフラグは無視され、ノードは必ずヒストリ チェーンに挿入されます。
caching(cch) boolean createedit
すべてのアトリビュートのキャッシングを切り替えることで、再計算を不要にします。
nodeState(nds) int
ノードの評価方法を定義します。
  • 0: Normal
  • 1: PassThrough
  • 2: Blocking
  • 3: 内部的に無効。有効にすると、Normal の状態に戻ります。
  • 4: 内部的に無効。有効にすると、PassThrough 状態に戻ります。
  • 5: 内部的に無効。有効にすると、Blocking 状態に戻ります。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

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')