def unlock(): """Permanently unlock a locked scene Doesn't throw an error if scene is already unlocked. """ try: cmds.delete("lock") except ValueError: pass