ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.

概要

isDirty [-connection] [-datablock] string...

isDirty は、取り消し可能、照会不可能、および 編集不可能 です。

isDirty コマンドは、プラグがダーティかどうかのチェックに使用されます。ダーティでない場合は 0、ダーティな場合は 1 が返されます。複数のフラグが指定されている場合は、すべてのオブジェクトの論理積が返されます。つまり、ダーティなフラグが 1 つでもあれば、1 を返します。

戻り値

booleanプラグはダーティですか? 複数のプラグを指定した場合、ダーティ状態にあるすべての論理和が返されます。

関連

attributeQuery, getClassification, isConnected, nodeType, objExists, objectType

フラグ

connection, datablock
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-datablock(-d) create
プラグのデータブロック エントリをチェックします。
-connection(-c) create
プラグの接続をチェックします(既定)。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

// Create a plusMinusAverage node and a transform. We use the '-skipSelect'
// flag so that they are not displayed in the Attribute Editor because
// that would force an evaluation and cause the plugs to become clean.
createNode -n pma -skipSelect plusMinusAverage;
createNode -n t -skipSelect transform;
// Hide the transform so that Maya's draw won't force an evaluation which
// would clean its plugs.
hide t;
// Connect the transform's 'tx' to one of the plusMinusAverage node's
// inputs.
connectAttr t.tx pma.input1D[0];
// Set the value of the transform's 'tx' and check that the
// target of the connection has become dirty.
setAttr t.tx 13;
isDirty pma.input1D[0];
// Result: 1 //
// If we retrieve the value of the destination attribute
// then the connection becomes clean.
getAttr pma.input1D[0];
// Result: 13 //
isDirty pma.input1D[0];
// Result: 0 //
// A plusMinusAverage node's 'output1D' attribute depends
// upon the values in its 'input1D' array. Since we haven't
// retrieved its value yet, it should still be dirty. However,
// it seems to be clean:
isDirty pma.output1D;
// Result: 0 //
// The reason for this is that the 'isDirty' command
// by default only checks connections and 'output1D' has
// no connection to be dirty. If we instead check its
// value in the datablock, we get the expected result:
isDirty -d pma.output1D;
// Result: 1 //
// The output value will remain dirty until we
// force its evaluation by retrieving it.
getAttr pma.output1D;
// Result: 13 //
isDirty -d pma.output1D;
// Result: 0 //