def process_file_in_pipeline(self, image: PipeImage) -> None: infile = image.last outfile = validate_output_path(self.pipeline.get_outfile(image, self.suffix)) if not isfile(outfile): self.process_file( infile, outfile, self.pipeline.verbosity, scale=self.scale, ) image.log(self.name, outfile)
def process_file_in_pipeline(self, image: PipeImage) -> None: infile = validate_input_path(image.last) outfile = validate_output_path( f"{self.output_directory}/{image.name}.{get_ext(image.last)}") if not isfile(outfile): self.process_file(infile, outfile, verbosity=self.pipeline.verbosity) image.log(self.name, outfile)
def process_file_in_pipeline(self, image: PipeImage) -> None: if image.name in self.infiles: infile = self.infiles[image.name] outfile = validate_output_path( self.pipeline.get_outfile(image, self.suffix) ) if not isfile(outfile): self.process_file(infile, outfile, self.pipeline.verbosity) image.log(self.name, outfile) else: raise FileNotFoundError( f"{self} did not file matching '{image.name}' in '{self.directory}'" )
def process_file_in_pipeline(self, image: PipeImage) -> None: if not any(win32_ver()): raise UnsupportedPlatformError( "TexconvProcessor may only be used on Windows") if not which("texconv.exe"): raise ExecutableNotFoundError( "texcov.exe executable not found in PATH") infile = image.last outfile = validate_output_path( self.pipeline.get_outfile(image, self.suffix, extension="dds")) if not isfile(outfile): self.process_file( infile, outfile, self.pipeline.verbosity, sepalpha=self.sepalpha, filetype=self.filetype, format=self.format, ) image.log(self.name, outfile)
def __iter__(self): for i, infile in enumerate(self.infiles): image = PipeImage(infile) if self.pipeline.verbosity >= 1: print(f"{image.name} ({i}/{len(self.infiles)})") yield image