|
@@ -162,13 +162,15 @@ Error GltfImporter::init(CString inputFname,
|
|
|
F32 lodFactor,
|
|
F32 lodFactor,
|
|
|
U32 lodCount,
|
|
U32 lodCount,
|
|
|
F32 lightIntensityScale,
|
|
F32 lightIntensityScale,
|
|
|
- U32 threadCount)
|
|
|
|
|
|
|
+ U32 threadCount,
|
|
|
|
|
+ CString comment)
|
|
|
{
|
|
{
|
|
|
m_inputFname.create(inputFname);
|
|
m_inputFname.create(inputFname);
|
|
|
m_outDir.create(outDir);
|
|
m_outDir.create(outDir);
|
|
|
m_rpath.create(rpath);
|
|
m_rpath.create(rpath);
|
|
|
m_texrpath.create(texrpath);
|
|
m_texrpath.create(texrpath);
|
|
|
m_optimizeMeshes = optimizeMeshes;
|
|
m_optimizeMeshes = optimizeMeshes;
|
|
|
|
|
+ m_comment.create(comment);
|
|
|
|
|
|
|
|
m_lightIntensityScale = clamp(lightIntensityScale, 0.1f, 1.0f);
|
|
m_lightIntensityScale = clamp(lightIntensityScale, 0.1f, 1.0f);
|
|
|
|
|
|
|
@@ -224,6 +226,7 @@ Error GltfImporter::writeAll()
|
|
|
StringAuto sceneFname(m_alloc);
|
|
StringAuto sceneFname(m_alloc);
|
|
|
sceneFname.sprintf("%sscene.lua", m_outDir.cstr());
|
|
sceneFname.sprintf("%sscene.lua", m_outDir.cstr());
|
|
|
ANKI_CHECK(m_sceneFile.open(sceneFname.toCString(), FileOpenFlag::WRITE));
|
|
ANKI_CHECK(m_sceneFile.open(sceneFname.toCString(), FileOpenFlag::WRITE));
|
|
|
|
|
+ ANKI_CHECK(m_sceneFile.writeText("-- Generated by: %s\n", m_comment.cstr()));
|
|
|
ANKI_CHECK(m_sceneFile.writeText("local scene = getSceneGraph()\nlocal events = getEventManager()\n"));
|
|
ANKI_CHECK(m_sceneFile.writeText("local scene = getSceneGraph()\nlocal events = getEventManager()\n"));
|
|
|
|
|
|
|
|
// Nodes
|
|
// Nodes
|