def singleTeamCity(tricode): ''' A full scene-building routine for single-team CITY elements.''' loadTeamsLite(tricode) #sort sort.sceneTeardown() sc = sort.SortControl('Single_Team_CITY') sc.run() # change output path vrs = pm.PyNode('vraySettings') vrs.fileNamePrefix.set('TEAMS/{}/%l/%l.#'.format(tricode)) # rename / save scene scene = project.Scene() scene.rename(tricode)
def splitMatchup(tricode, package): ''' A full scene-building routine for single-team elements.''' #load in the new team loadTeamsStadium(tricode, tricode, diagnostic=False, clean=True) #sort sort.sceneTeardown() sc = sort.SortControl('Split_Matchup_{}'.format(package.upper())) sc.run() #change output path vrs = pm.PyNode('vraySettings') vrs.fileNamePrefix.set('TEAMS/{}/%l/%l.#'.format(tricode)) #rename / save scene scene = project.Scene() scene.rename(tricode)
def teardownBtn(self, *a): sort.sceneTeardown()
def multiTeam(tricode_list, playoff=False, force_name=None): if (playoff): attachments = getMultiTeamAttachments() if len(attachments) > len(tricode_list): pm.warning( 'ERROR Not enough teams specified ({} minimum). Aborting...'. format(len(attachments))) return if len(attachments) < len(tricode_list): pm.warning( 'ERROR Too many teams specified ({} maximum). Aborting...'. format(len(attachments))) return for idx, loc in enumerate(attachments): print attachments[idx] attachments[idx] = loc[:-7].strip() for idx, tricode in enumerate(tricode_list): loadAssetsLite(tricode, attachments[idx], playoff=playoff) elif not (playoff): namespaces = getMultiTeamAttachments(references=True) if len(namespaces) > len(tricode_list): pm.warning( 'ERROR Not enough teams specified ({} minimum). Aborting...'. format(len(namespaces))) return if len(namespaces) < len(tricode_list): pm.warning( 'ERROR Too many teams specified ({} maximum). Aborting...'. format(len(namespaces))) return for idx, namespace in enumerate(namespaces): namespaces[idx] = namespace[:-4].strip() for idx, tricode in enumerate(tricode_list): loadAssetsNYS(tricode, namespaces[idx]) sort.sceneTeardown() sc = sort.SortControl('Multi-Team (NYS / CHAMP)') sc.run() if project.isScene(): scene = project.Scene() scene.rename(name=force_name, save=False) prefix = scene.custom_string vrs = pm.PyNode('vraySettings') vrs.fileNamePrefix.set('{}/%l/%l.#'.format(prefix)) scene.save() return else: return