UI: Translate to current OS for all colection imports

Importers are written to convert third-party collection formats to a
Windows OBS scene collection. The Studio importer is capable of
translating scene collections to the correct types for the current
operating system. This change makes it so all imports will be ran
through the Studio translation, not just Studio and SL collections.
master
VodBox 2021-09-25 22:13:38 +12:00 committed by Jim
parent 8a132ad69f
commit 19ced32c58
3 changed files with 13 additions and 0 deletions

View File

@ -530,6 +530,11 @@ int ClassicImporter::ImportScenes(const string &path, string &name, Json &res)
Json sc = data;
translate_sc(sc, res);
QDir dir(path.c_str());
TranslateOSStudio(res);
TranslatePaths(res, QDir::cleanPath(dir.filePath("..")).toStdString());
return IMPORTER_SUCCESS;
}

View File

@ -439,7 +439,10 @@ int SLImporter::ImportScenes(const string &path, string &name, Json &res)
}
}
QDir dir(path.c_str());
TranslateOSStudio(res);
TranslatePaths(res, QDir::cleanPath(dir.filePath("..")).toStdString());
return result;
}

View File

@ -477,6 +477,11 @@ int XSplitImporter::ImportScenes(const string &path, string &name,
res = r;
QDir dir(path.c_str());
TranslateOSStudio(res);
TranslatePaths(res, QDir::cleanPath(dir.filePath("..")).toStdString());
return IMPORTER_SUCCESS;
}