2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:47:42 +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

@@ -9,6 +9,7 @@
#include <regex>
#include <list>
#include "HECL/Database.hpp"
#include "../blender/BlenderConnection.hpp"
#include "LogVisor/LogVisor.hpp"
LogVisor::LogModule LogModule("HECLDriver");
@@ -64,30 +65,13 @@ static const HECL::SystemRegex regOPEN(_S("-o([^\"]*|\\S*)"), std::regex::ECMASc
static const HECL::SystemRegex regVERBOSE(_S("-v(v*)"), std::regex::ECMAScript|std::regex::optimize);
static const HECL::SystemRegex regFORCE(_S("-f"), std::regex::ECMAScript|std::regex::optimize);
#include "../blender/BlenderConnection.hpp"
static LogVisor::LogModule AthenaLog("Athena");
static void AthenaExc(const Athena::error::Level& level, const char* file,
const char*, int line, const char* fmt, ...)
{
LogVisor::Level vLevel = LogVisor::Info;
switch (level)
{
case Athena::error::MESSAGE:
vLevel = LogVisor::Info;
break;
case Athena::error::WARNING:
vLevel = LogVisor::Warning;
break;
case Athena::error::ERROR:
vLevel = LogVisor::Error;
break;
case Athena::error::FATAL:
vLevel = LogVisor::FatalError;
}
va_list ap;
va_start(ap, fmt);
AthenaLog.reportSource(vLevel, file, line, fmt, ap);
AthenaLog.reportSource(LogVisor::Level(level), file, line, fmt, ap);
va_end(ap);
}
@@ -105,9 +89,6 @@ int main(int argc, const char** argv)
LogVisor::RegisterConsoleLogger();
atSetExceptionHandler(AthenaExc);
//CBlenderConnection bconn(false);
//return 0;
/* Basic usage check */
if (argc == 1)
{
@@ -265,12 +246,14 @@ int main(int argc, const char** argv)
int retval = tool->run();
if (LogVisor::ErrorCount > ErrorRef)
{
HECL::BlenderConnection::Shutdown();
#if WIN_PAUSE
system("PAUSE");
#endif
return -1;
}
HECL::BlenderConnection::Shutdown();
#if WIN_PAUSE
system("PAUSE");
#endif