mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 15:47:46 +00:00
Create directory chains at a late point during extract
This commit is contained in:
@@ -1332,6 +1332,22 @@ std::vector<BlenderConnection::DataStream::Light> BlenderConnection::DataStream:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void BlenderConnection::DataStream::compileGuiFrame(const std::string& pathOut, int version)
|
||||
{
|
||||
if (m_parent->m_loadedType != BlendType::Frame)
|
||||
BlenderLog.report(logvisor::Fatal, _S("%s is not a FRAME blend"),
|
||||
m_parent->m_loadedBlend.getAbsolutePath().c_str());
|
||||
|
||||
char req[512];
|
||||
snprintf(req, 512, "FRAMECOMPILE %s %d", pathOut.c_str(), version);
|
||||
m_parent->_writeStr(req);
|
||||
|
||||
char readBuf[256];
|
||||
m_parent->_readStr(readBuf, 256);
|
||||
if (strcmp(readBuf, "OK"))
|
||||
BlenderLog.report(logvisor::Fatal, "unable to compile frame: %s", readBuf);
|
||||
}
|
||||
|
||||
std::vector<ProjectPath> BlenderConnection::DataStream::getTextures()
|
||||
{
|
||||
m_parent->_writeStr("GETTEXTURES");
|
||||
|
||||
@@ -53,14 +53,18 @@ void ClientProcess::LambdaTransaction::run(BlenderToken& btok)
|
||||
m_complete = true;
|
||||
}
|
||||
|
||||
ClientProcess::Worker::Worker(ClientProcess& proc)
|
||||
: m_proc(proc)
|
||||
ClientProcess::Worker::Worker(ClientProcess& proc, int idx)
|
||||
: m_proc(proc), m_idx(idx)
|
||||
{
|
||||
m_thr = std::thread(std::bind(&Worker::proc, this));
|
||||
}
|
||||
|
||||
void ClientProcess::Worker::proc()
|
||||
{
|
||||
char thrName[64];
|
||||
snprintf(thrName, 64, "HECL Client Worker %d", m_idx);
|
||||
logvisor::RegisterThreadName(thrName);
|
||||
|
||||
while (m_proc.m_running)
|
||||
{
|
||||
std::unique_lock<std::mutex> lk(m_proc.m_mutex);
|
||||
@@ -100,7 +104,7 @@ ClientProcess::ClientProcess(int verbosityLevel)
|
||||
for (int i=0 ; i<cpuCount ; ++i)
|
||||
{
|
||||
std::unique_lock<std::mutex> lk(m_mutex);
|
||||
m_workers.emplace_back(*this);
|
||||
m_workers.emplace_back(*this, m_workers.size());
|
||||
m_initCv.wait(lk);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ bool Project::cookPath(const ProjectPath& path, FProgress progress,
|
||||
std::vector<SpecInst> specInsts;
|
||||
specInsts.reserve(m_compiledSpecs.size());
|
||||
for (const ProjectDataSpec& spec : m_compiledSpecs)
|
||||
if (spec.active)
|
||||
if (spec.active && spec.spec.m_factory)
|
||||
specInsts.emplace_back(&spec.spec,
|
||||
std::unique_ptr<IDataSpec>(spec.spec.m_factory(*this, DataSpecTool::Cook)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user