def getShotsForActiveSequence(taggedShotsOnly=False): """ Returns a list of shots from the active sequence. Optionally returns only shots which are Tagged by setting taggedShotsOnly to True """ sequence = None try: sequence = activeSequence() except: sequence = activeView().selection()[0].parentSequence() if not sequence: return # Get all Tracks in the Sequence... tracks = sequence.items() shots = [] if not taggedShotsOnly: for track in tracks: shots += [ item for item in track.items() if isinstance(item, TrackItem) ] else: for track in tracks: shots += [ item for item in track.items() if isinstance(item, TrackItem) and len(item.tags()) > 0 ] return shots
def getShotsForActiveSequence(taggedShotsOnly=False): """ Returns a list of shots from the active sequence. Optionally returns only shots which are Tagged by setting taggedShotsOnly to True """ sequence = None try: sequence = activeSequence() except: sequence = activeView().selection()[0].parentSequence() if not sequence: return # Get all Tracks in the Sequence... tracks = sequence.items() shots = [] if not taggedShotsOnly: for track in tracks: shots+=[item for item in track.items() if isinstance(item, TrackItem)] else: for track in tracks: shots+=[item for item in track.items() if isinstance(item, TrackItem) and len(item.tags())>0] return shots
def get_active_sequence(self): """get_active_sequence will return the active Sequence Returns: Dict -- Hiero Active Sequence """ return activeSequence()
def writeAllShotsReportCSVForActiveSequence(self): # Get the active Sequence try: sequence = activeSequence() except: sequence = activeView().selection()[0].parentSequence() # Get all Tracks in the Sequence... tracks = sequence.items() shots = [] for track in tracks: shots+=[item for item in track.items() if isinstance(item, TrackItem)] self.writeCSVTagReportFromShotSelection(shotSelection=shots, taggedShotsOnly=False)
def writeAllShotsReportCSVForActiveSequence(self): # Get the active Sequence try: sequence = activeSequence() except: sequence = activeView().selection()[0].parentSequence() # Get all Tracks in the Sequence... tracks = sequence.items() shots = [] for track in tracks: shots += [ item for item in track.items() if isinstance(item, TrackItem) ] self.writeCSVTagReportFromShotSelection(shotSelection=shots, taggedShotsOnly=False)