2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:44:56 +00:00

BlenderConnection updates

This commit is contained in:
Jack Andersen
2015-07-27 16:25:33 -10:00
parent 873eba1183
commit 17522ff48f
11 changed files with 152 additions and 50 deletions

View File

@@ -22,11 +22,21 @@ public:
ToolExtract(const ToolPassInfo& info)
: ToolBase(info)
{
if (!info.project)
LogModule.report(LogVisor::FatalError, "hecl extract must be ran within a project directory");
if (!m_info.args.size())
LogModule.report(LogVisor::FatalError, "hecl extract needs a source path as its first argument");
if (!info.project)
{
/* Get name from input file and init project there */
std::string baseFile = info.args[0];
size_t slashPos = baseFile.rfind(_S('/'));
if (slashPos == HECL::SystemString::npos)
slashPos = baseFile.rfind(_S('\\'));
if (slashPos != HECL::SystemString::npos)
baseFile.assign(baseFile.g
LogModule.report(LogVisor::FatalError, "hecl extract must be ran within a project directory");
}
m_einfo.srcpath = m_info.args[0];
m_einfo.extractArgs.reserve(info.args.size() - 1);
m_einfo.force = info.force;