// The GUI will be updated by callbacks that are listening to slot changesfor i in range(0, len(fileNames)):
datasetInfo = DatasetInfo()
datasetInfo.filePath = fileNames[i]// Allow labels by default if this gui isn"t being used for batch data.
datasetInfo.allowLabels = ( self.guiMode == GuiMode.Normal )
After Change
for i, filePath in enumerate(fileNames):
datasetInfo = DatasetInfo()
cwd = self.mainOperator.WorkingDirectory.value
absPath, relPath = getPathVariants(filePath, cwd)// Relative by default, unless the file is in a totally different tree from the working directory.iflen(os.path.commonprefix([cwd, absPath])) > 1:
datasetInfo.filePath = relPath