소스 검색

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;
 	translate_sc(sc, res);
 
+	QDir dir(path.c_str());
+
+	TranslateOSStudio(res);
+	TranslatePaths(res, QDir::cleanPath(dir.filePath("..")).toStdString());
+
 	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);
+	TranslatePaths(res, QDir::cleanPath(dir.filePath("..")).toStdString());
 
 	return result;
 }

+ 5 - 0
UI/importers/xsplit.cpp

@@ -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;
 }