2015-08-04 21:35:41 +00:00
|
|
|
#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)
|
|
|
|
{
|
|
|
|
HECL::BlenderConnection& conn = HECL::BlenderConnection::SharedConnection();
|
2015-11-21 01:16:07 +00:00
|
|
|
if (!conn.createBlend(path, HECL::BlenderConnection::BlendType::None))
|
2015-08-04 21:35:41 +00:00
|
|
|
return false;
|
|
|
|
{
|
2015-08-05 21:46:07 +00:00
|
|
|
HECL::BlenderConnection::PyOutStream os = conn.beginPythonOut(true);
|
2015-08-04 21:35:41 +00:00
|
|
|
os << RETRO_MASTER_SHADER;
|
|
|
|
os << "make_master_shader_library()\n";
|
|
|
|
}
|
|
|
|
return conn.saveBlend();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|