melOptions [-duplicateVariableWarnings boolean]
melOptions は、取り消し不可能、照会可能、および編集不可能です。
Maya の埋め込み言語(MEL)の動作に影響を与える設定および照会のオプションです。なし
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
-duplicateVariableWarnings(-dvw)
|
boolean
|
|
||
|
||||
// To find out if there are any duplicate variable declarations in
// a script:
// Save the current setting of the duplicateVariableWarnings option.
int $optionVal = `melOptions -q -duplicateVariableWarnings`;
// Turn the option on.
melOptions -duplicateVariableWarnings on;
// Source the script and see all the warnings generated. eval() is
// needed to ensure that the 'source' command is not processed before
// the warnings have been turned on.
eval("source \"myScript.mel\"");
// Warning: line 13: int $i; //
// Warning: line 13: "myScript.mel" line 5.8 : Redeclaration of variable "$i" shadows previous declaration at line 3. Previous value will be retained. //
// Restore the option to its original value.
melOptions -duplicateVariableWarnings $optionVal;