Search code examples
mayamel

Mel check if unresolved name exists


How can I check if a reference with a particular unresolved name is loaded using an if statement. Thanks

Pseudo code example

If (referenceLoaded "C:/bridge.ma"){ do stuff}


Solution

  • I resolved the erroring out issue by using catch

    if (catch(!referenceQuery -isLoaded "C:/bridge.ma")) { continue; } else if (referenceQuery -isLoaded "C:/bridge.ma") { print("reference is loaded"); }