2015-08-04 21:35:41 +00:00
|
|
|
#include <stdint.h>
|
2016-09-18 23:47:48 +00:00
|
|
|
#include "hecl/Blender/BlenderConnection.hpp"
|
2015-08-04 21:35:41 +00:00
|
|
|
#include "BlenderSupport.hpp"
|
|
|
|
|
|
|
|
extern "C" uint8_t RETRO_MASTER_SHADER[];
|
|
|
|
extern "C" size_t RETRO_MASTER_SHADER_SZ;
|
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
namespace DataSpec
|
2015-08-04 21:35:41 +00:00
|
|
|
{
|
|
|
|
namespace Blender
|
|
|
|
{
|
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
bool BuildMasterShader(const hecl::ProjectPath& path)
|
2015-08-04 21:35:41 +00:00
|
|
|
{
|
2016-03-04 23:04:53 +00:00
|
|
|
hecl::BlenderConnection& conn = hecl::BlenderConnection::SharedConnection();
|
|
|
|
if (!conn.createBlend(path, hecl::BlenderConnection::BlendType::None))
|
2015-08-04 21:35:41 +00:00
|
|
|
return false;
|
|
|
|
{
|
2016-03-04 23:04:53 +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();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|