def __init__(self, name=None, force=False): if name and cmds.uiTemplate(name, exists=True): if force: cmds.deleteUI(name, uiTemplate=True) else: self._name = name return args = [name] if name else [] self._name = cmds.uiTemplate(*args)
def exists(name): return cmds.uiTemplate(name, exists=True)
def uiTemplate(name=None, force=False, exists=None): if exists: return cmds.uiTemplate(name, exists) else: return _uitypes.UITemplate(name=name, force=force)
def uiTemplate(name=None, force=False, exists=None): import uitypes if exists: return cmds.uiTemplate(name, exists=1) else: return uitypes.UITemplate(name=name, force=force)