2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 15:47:46 +00:00

added 'bintoc' tool; embedded blender python scripts

This commit is contained in:
Jack Andersen
2015-08-04 11:35:41 -10:00
parent 73185fc32c
commit 8e89d7efd0
9 changed files with 634 additions and 38 deletions

View File

@@ -0,0 +1,29 @@
#include <stdint.h>
#include <BlenderConnection.hpp>
#include "BlenderSupport.hpp"
extern "C" uint8_t RETRO_MASTER_SHADER[];
extern "C" size_t RETRO_MASTER_SHADER_SZ;
namespace Retro
{
namespace Blender
{
bool BuildMasterShader(const HECL::ProjectPath& path)
{
if (path.getPathType() == HECL::ProjectPath::PT_FILE)
return true;
HECL::BlenderConnection& conn = HECL::BlenderConnection::SharedConnection();
if (!conn.createBlend(path.getAbsolutePath()))
return false;
{
HECL::BlenderConnection::PyOutStream os = conn.beginPythonOut();
os << RETRO_MASTER_SHADER;
os << "make_master_shader_library()\n";
}
return conn.saveBlend();
}
}
}