def map_files_and_replace_slashes(inputFile, outputFile): if SystemUtils.IsRunningOnWindows(): RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator( inputFile, outputFile, "/", "\\") else: RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator( inputFile, outputFile, "\\", "/") os.chmod(outputFile, os.stat(inputFile).st_mode)
def pre_render_tasks(self): """Load config file and do remapping.""" self.LogInfo("OpenPype Tile Assembler starting...") scene_filename = self.GetDataFilename() temp_scene_directory = self.CreateTempDirectory( "thread" + str(self.GetThreadNumber())) temp_scene_filename = Path.GetFileName(scene_filename) self.config_file = Path.Combine(temp_scene_directory, temp_scene_filename) if SystemUtils.IsRunningOnWindows(): RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator( scene_filename, self.config_file, "/", "\\") else: RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator( scene_filename, self.config_file, "\\", "/") os.chmod(self.config_file, os.stat(self.config_file).st_mode)