Ejemplo n.º 1
0
 def parse_clip_path_or_seq_dir_path(self, path):
     parts = path.parts
     _, _, self._volume, self._classification, self._owner, self._show, self._scene, self._element_type,\
         self._reel, clip_file_or_seq_dir = parts
     if not self._volume.startswith('jgoldstone'):
         raise RuntimeError(
             "sequence path volume must start with jgoldstone")
     if self._classification not in [
             'not_secret', 'arri_secret', 'other_secret'
     ]:
         raise RuntimeError(
             "classification not one of 'not_secret', 'arri_secret', or 'other_secret'"
         )
     if self._element_type not in ['ocd', 'derived', 'etc']:
         raise RuntimeError(
             "element type must be one of 'ocd', 'derived', or 'etc'")
     if path.suffix in ['.mov', '.mxf']:
         raise RuntimeError(
             "cannot currently directly characterize QuickTime or MXF clips"
         )
     if path.suffix == '.ari':
         raise RuntimeError(
             "cannot currently directly characterize ARRRIAW file")
     elif path.suffix == '.dpx':
         raise RuntimeError(
             "cannot currently directly characterize ARRRIAW file")
     if not path.is_dir():
         raise RuntimeError(
             "Only supported input for characterization is directory of ACES container files"
         )
     sequences = FileSequence.findSequencesOnDisk(str(path))
     if not len(sequences):
         raise RuntimeError(
             "The nominal directory of frames to characterize is empty")
     self._sequences = sequences
Ejemplo n.º 2
0
    def _get_seq(self, path):
        """
        Crate file sequence object by given a file sequence path such as
        /path/image.%04d.dpx

        :param path: (str) File sequence path

        :returns: File Sequence object
        """
        s = re.sub(r'%[0-9]+d', '#', path)
        seq = FileSequence.findSequencesOnDisk(os.path.dirname(s))[0]

        return seq