exists コマンドは、引数が有効なコマンド、サブルーチンまたはスクリプトの場合、true を返します。
if (exists("sphere")) {
sphere; // make a sphere
}
objExists 関数は、特定の名前のオブジェクトが存在する場合に、true を返します。
sphere -name "george";
// Result: george makeNurbSphere1 //
print(objExists("george"));
1
print(objExists("martha"));
0
attributeExists を使用して、指定されたアトリビュートがノード上に存在するかどうかを確認します。このコマンドの形式は次の通りです。
attributeExists("attributeName","nodeName")
if (attributeExists("visibility","mySphere")) {
setAttr mySphere.visibility on;
}