From 6ac518d99e832500fc14a826b66a67bb900a8293 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 6 Jul 2016 18:23:36 -1000 Subject: [PATCH] setGlobalProject now called in cook transactions --- DataSpec/DNACommon/DNACommon.hpp | 2 +- DataSpec/SpecBase.cpp | 7 ++++++- DataSpec/SpecBase.hpp | 1 + Editor/ProjectResourceFactoryBase.cpp | 1 + amuse | 2 +- hecl | 2 +- 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/DataSpec/DNACommon/DNACommon.hpp b/DataSpec/DNACommon/DNACommon.hpp index 326b3e4f6..2a5321acf 100644 --- a/DataSpec/DNACommon/DNACommon.hpp +++ b/DataSpec/DNACommon/DNACommon.hpp @@ -110,7 +110,7 @@ public: id = TranslatePakIdToPath(id); } - static void setGlobalProject(hecl::Database::Project& project) + static void setThreadProject(hecl::Database::Project& project) { s_Project.reset(&project); } diff --git a/DataSpec/SpecBase.cpp b/DataSpec/SpecBase.cpp index b8ae420a3..745d64fa4 100644 --- a/DataSpec/SpecBase.cpp +++ b/DataSpec/SpecBase.cpp @@ -37,7 +37,7 @@ SpecBase::SpecBase(const hecl::Database::DataSpecEntry* specEntry, hecl::Databas : hecl::Database::IDataSpec(specEntry), m_project(project), m_pc(pc), m_masterShader(project.getProjectWorkingPath(), ".hecl/RetroMasterShader.blend") { - DataSpec::UniqueIDBridge::setGlobalProject(m_project); + DataSpec::UniqueIDBridge::setThreadProject(m_project); } static const hecl::SystemString regNONE = _S(""); @@ -45,6 +45,11 @@ static const hecl::SystemString regE = _S("NTSC"); static const hecl::SystemString regJ = _S("NTSC-J"); static const hecl::SystemString regP = _S("PAL"); +void SpecBase::setThreadProject() +{ + UniqueIDBridge::setThreadProject(m_project); +} + bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector& reps) { m_disc = nod::OpenDiscFromImage(info.srcpath.c_str(), m_isWii); diff --git a/DataSpec/SpecBase.hpp b/DataSpec/SpecBase.hpp index d63c397b8..5603ab9f9 100644 --- a/DataSpec/SpecBase.hpp +++ b/DataSpec/SpecBase.hpp @@ -13,6 +13,7 @@ namespace DataSpec struct SpecBase : hecl::Database::IDataSpec { /* HECL Adaptors */ + void setThreadProject(); bool canExtract(const ExtractPassInfo& info, std::vector& reps); void doExtract(const ExtractPassInfo& info, FProgress progress); diff --git a/Editor/ProjectResourceFactoryBase.cpp b/Editor/ProjectResourceFactoryBase.cpp index e1e2b2839..361df498d 100644 --- a/Editor/ProjectResourceFactoryBase.cpp +++ b/Editor/ProjectResourceFactoryBase.cpp @@ -281,6 +281,7 @@ void ProjectResourceFactoryBase::BackgroundIndexProc() athena::io::YAMLDocWriter nameWriter(nullptr); BackgroundIndexRecursiveProc(specRoot, cacheWriter, nameWriter, 0); + tagCachePath.makeDirChain(false); FILE* cacheFile = hecl::Fopen(tagCachePath.getAbsolutePath().c_str(), _S("w")); yaml_emitter_set_output_file(cacheWriter.getEmitter(), cacheFile); cacheWriter.finish(); diff --git a/amuse b/amuse index 1be5d6e82..83a2bf0b4 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 1be5d6e82114f63839eeb29766af8bd8ce331222 +Subproject commit 83a2bf0b4e98c07eeed0d642b328b8b046706da2 diff --git a/hecl b/hecl index b76a72a8e..f3d6091cf 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit b76a72a8e0360eea64c4c58d3b1a422ba5aa5b07 +Subproject commit f3d6091cf793da84ea3c7f6a1f6848cafc1f0d13