Ejemplo n.º 1
0
def check_usd_compliance(rootLayer, arkit=False):
    #An API change in v18.11 changed the sytax for UsdUtils.ComplianceChecker...
    if Usd.GetMinorVersion() >= 18 and Usd.GetPatchVersion() >= 11:
        checker = UsdUtils.ComplianceChecker(arkit=arkit, skipARKitRootLayerCheck=False)
        checker.CheckCompliance(rootLayer)
    else:
        #Behavior in v18.09
        checker = UsdUtils.ComplianceChecker(rootLayer, arkit=arkit, skipARKitRootLayerCheck=False)

    errors = checker.GetErrors()
    failedChecks = checker.GetFailedChecks()
    for msg in errors + failedChecks:
        print(msg)
    return len(errors) == 0 and len(failedChecks) == 0