浏览代码

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.
VodBox 4 年之前
父节点
当前提交
19ced32c58
共有 3 个文件被更改,包括 13 次插入0 次删除
  1. 5 0
      UI/importers/classic.cpp
  2. 3 0
      UI/importers/sl.cpp
  3. 5 0
      UI/importers/xsplit.cpp

+ 5 - 0
UI/importers/classic.cpp

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

+ 3 - 0
UI/importers/sl.cpp

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

+ 5 - 0
UI/importers/xsplit.cpp

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