def check_dag_ns(n): mfndagSetObject(n) if not _isRootOf(rnsrela, mfndagParentNamespace()): return False # END first namespace check # assemblies have no parents if assemblies: nc = MDagPath(n) mdppop(nc, 1) if mdplen(nc) != 0: return False # END check length elif assembliesInReference: nc = MDagPath(n) mdppop(nc, 1) if mdplen(nc) != 0: # check whether parent is in a different namespace mfndagSetObject(n) if _isRootOf(rnsrela, mfndagParentNamespace()): return False # END check parent rns # END check length # END handle assemblies return True
def check_ns(n): mfndepSetObject(n) if not _isRootOf(rnsrela, mfndepParentNamespace()): return False # END first namespace check return True