def buildTagsData(exportItems): # Collect tags from selection tags = FnExporterBase.tagsFromSelection(exportItems, includeChildren=True) filters = ["Transcode", "Nuke Project File"] # Filter Transcode/NukeProjectFile tags out def reverse_contains(item, filters): for filter in filters: if filter in item: return False return True uniquelist = set() def uniquetest(tag, type): uniquestr = str(tag.name()) + str(type) if uniquestr in uniquelist: return False uniquelist.add(uniquestr) return True tags = [(tag, objecttype) for tag, objecttype in tags if tag.visible() and reverse_contains(tag.name(), filters) and uniquetest(tag, objecttype)] return tags
def _get_tags(self, items): tags = FnExporterBase.tagsFromSelection(items, includeChildren=True) tags = [ tag for (tag, objType) in tags if tag.visible() and "Transcode" not in tag.name() ] tags = [tag for tag in tags if "Nuke Project File" not in tag.name()] return tags
def isTranscodeExport(self): """ Check if there are transcode tasks in this export. """ # To avoid importing the hiero.exporters module here, just check # for 'Transcode' in the preset class name. for (exportPath, preset) in self._exportTemplate.flatten(): if "Transcode" in FnExporterBase.classBasename(type(preset)): return True return False
def _get_tags(self, items): tags = FnExporterBase.tagsFromSelection(items, includeChildren=True) tags = [tag for (tag, objType) in tags if tag.visible() and "Transcode" not in tag.name()] tags = [tag for tag in tags if "Nuke Project File" not in tag.name()] return tags
def findTagsForItems(self, exportItems): """ Find tags for the export items. """ return FnExporterBase.tagsFromSelection(exportItems, includeChildren=True)