editor: explicit runtime path contract
This commit is contained in:
@@ -84,9 +84,9 @@ void EditorProjectRuntime::Reset() {
|
||||
m_pendingSceneOpenPath.reset();
|
||||
}
|
||||
|
||||
bool EditorProjectRuntime::Initialize(const std::filesystem::path& repoRoot) {
|
||||
bool EditorProjectRuntime::Initialize(const std::filesystem::path& projectRoot) {
|
||||
Reset();
|
||||
m_browserModel.Initialize(repoRoot);
|
||||
m_browserModel.Initialize(projectRoot);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
};
|
||||
|
||||
void Reset();
|
||||
bool Initialize(const std::filesystem::path& repoRoot);
|
||||
bool Initialize(const std::filesystem::path& projectRoot);
|
||||
void BindSelectionService(EditorSelectionService* selectionService);
|
||||
void Refresh();
|
||||
|
||||
|
||||
@@ -545,9 +545,9 @@ void ProjectBrowserModel::Reset() {
|
||||
m_currentFolderId.clear();
|
||||
}
|
||||
|
||||
void ProjectBrowserModel::Initialize(const std::filesystem::path& repoRoot) {
|
||||
void ProjectBrowserModel::Initialize(const std::filesystem::path& projectRoot) {
|
||||
Reset();
|
||||
m_assetsRootPath = (repoRoot / "project/Assets").lexically_normal();
|
||||
m_assetsRootPath = (projectRoot / "Assets").lexically_normal();
|
||||
TraceProjectBrowser("ProjectBrowserModel::Initialize assetsRoot=" + PathToUtf8String(m_assetsRootPath));
|
||||
std::error_code errorCode = {};
|
||||
if (!std::filesystem::exists(m_assetsRootPath, errorCode)) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
ProjectBrowserModel& operator=(ProjectBrowserModel&&) noexcept = default;
|
||||
|
||||
void Reset();
|
||||
void Initialize(const std::filesystem::path& repoRoot);
|
||||
void Initialize(const std::filesystem::path& projectRoot);
|
||||
void Refresh();
|
||||
|
||||
bool Empty() const;
|
||||
|
||||
Reference in New Issue
Block a user