mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Changed: Convert MSTR to UTF-8
--HG-- branch : develop
This commit is contained in:
parent
6d651b9c68
commit
f5008cb00d
4 changed files with 11 additions and 11 deletions
|
@ -185,7 +185,7 @@ void CExportNel::addSSSTrack(CSSSBuild &ssBuilder, INode& node)
|
||||||
if(note)
|
if(note)
|
||||||
{
|
{
|
||||||
CSSSBuild::CKey ks;
|
CSSSBuild::CKey ks;
|
||||||
ks.Value = std::string(note->note);
|
ks.Value = note->note.ToUTF8();
|
||||||
ks.Time= CExportNel::convertTime (note->time);
|
ks.Time= CExportNel::convertTime (note->time);
|
||||||
bs.Track.push_back(ks);
|
bs.Track.push_back(ks);
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ NL3D::CTrackKeyFramerConstString* CExportNel::buildFromNoteTrack(INode& node)
|
||||||
{
|
{
|
||||||
firstDate = CExportNel::convertTime (note->time);
|
firstDate = CExportNel::convertTime (note->time);
|
||||||
}
|
}
|
||||||
ks.Value = std::string(note->note);
|
ks.Value = note->note.ToUTF8();
|
||||||
lastDate = CExportNel::convertTime (note->time);
|
lastDate = CExportNel::convertTime (note->time);
|
||||||
st->addKey(ks , lastDate );
|
st->addKey(ks , lastDate );
|
||||||
|
|
||||||
|
|
|
@ -768,7 +768,7 @@ void CExportNel::buildAMaterial (NL3D::CMaterial& material, CMaxMaterialInfo& ma
|
||||||
|
|
||||||
// Set material name
|
// Set material name
|
||||||
TSTR name=mtl.GetName();
|
TSTR name=mtl.GetName();
|
||||||
materialInfo.MaterialName = (const char*)name;
|
materialInfo.MaterialName = name.ToUTF8();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1120,7 +1120,7 @@ void CExportNel::buildAMaterial (NL3D::CMaterial& material, CMaxMaterialInfo& ma
|
||||||
|
|
||||||
// Set material name
|
// Set material name
|
||||||
TSTR name=mtl.GetName();
|
TSTR name=mtl.GetName();
|
||||||
materialInfo.MaterialName = (const char*)name;
|
materialInfo.MaterialName = name.ToUTF8();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -579,7 +579,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vector<CMeshInter
|
||||||
{
|
{
|
||||||
// Rename the material
|
// Rename the material
|
||||||
string newName = "NelAutoMergeRenamedTmp" + toString (i);
|
string newName = "NelAutoMergeRenamedTmp" + toString (i);
|
||||||
string originalName = (*lib)[i]->GetName ();
|
string originalName = (*lib)[i]->GetName ().ToUTF8();
|
||||||
renameMap.insert (map<string, string>::value_type (newName, originalName));
|
renameMap.insert (map<string, string>::value_type (newName, originalName));
|
||||||
(*lib)[i]->SetName (utf8ToTStr(newName));
|
(*lib)[i]->SetName (utf8ToTStr(newName));
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vector<CMeshInter
|
||||||
for (i=0; i<size; i++)
|
for (i=0; i<size; i++)
|
||||||
{
|
{
|
||||||
// Find the name in the map ?
|
// Find the name in the map ?
|
||||||
string key = (*lib)[i]->GetName ();
|
string key = (*lib)[i]->GetName ().ToUTF8();
|
||||||
map<string, string>::iterator ite = renameMap.find (key);
|
map<string, string>::iterator ite = renameMap.find (key);
|
||||||
|
|
||||||
// Not found ? This is a merged material
|
// Not found ? This is a merged material
|
||||||
|
@ -612,7 +612,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vector<CMeshInter
|
||||||
{
|
{
|
||||||
// Rename the material
|
// Rename the material
|
||||||
string newName = "NelAutoMergeRenamed" + toString (i);
|
string newName = "NelAutoMergeRenamed" + toString (i);
|
||||||
string originalName = (*lib)[i]->GetName ();
|
string originalName = (*lib)[i]->GetName ().ToUTF8();
|
||||||
renameMap.insert (map<string, string>::value_type (newName, originalName));
|
renameMap.insert (map<string, string>::value_type (newName, originalName));
|
||||||
(*lib)[i]->SetName (utf8ToTStr(newName));
|
(*lib)[i]->SetName (utf8ToTStr(newName));
|
||||||
}
|
}
|
||||||
|
@ -622,7 +622,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vector<CMeshInter
|
||||||
for (i=0; i<size; i++)
|
for (i=0; i<size; i++)
|
||||||
{
|
{
|
||||||
// Find the name
|
// Find the name
|
||||||
string key = (*lib)[i]->GetName ();
|
string key = (*lib)[i]->GetName ().ToUTF8();
|
||||||
map<string, string>::iterator ite = renameMap.find (key);
|
map<string, string>::iterator ite = renameMap.find (key);
|
||||||
if (ite != renameMap.end ())
|
if (ite != renameMap.end ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -223,7 +223,7 @@ Animatable* CExportNel::getSubAnimByName (Animatable& node, const char* sName)
|
||||||
TSTR sSubName=node.SubAnimName(nSub);
|
TSTR sSubName=node.SubAnimName(nSub);
|
||||||
|
|
||||||
// Good name?
|
// Good name?
|
||||||
if (strcmp (sSubName, sName)==0)
|
if (strcmp (sSubName.ToUTF8(), sName)==0)
|
||||||
{
|
{
|
||||||
// ok, return this subanim
|
// ok, return this subanim
|
||||||
return node.SubAnim(nSub);
|
return node.SubAnim(nSub);
|
||||||
|
@ -288,7 +288,7 @@ Control* CExportNel::getControlerByName (Animatable& node, const char* sName)
|
||||||
{
|
{
|
||||||
// Sub anim name
|
// Sub anim name
|
||||||
TSTR name=node.SubAnimName (s);
|
TSTR name=node.SubAnimName (s);
|
||||||
if (strcmp (name, sName)==0)
|
if (strcmp (name.ToUTF8(), sName)==0)
|
||||||
{
|
{
|
||||||
// Get the controller pointer of this sub anim
|
// Get the controller pointer of this sub anim
|
||||||
Control* c=GetControlInterface (node.SubAnim(s));
|
Control* c=GetControlInterface (node.SubAnim(s));
|
||||||
|
@ -502,7 +502,7 @@ std::string CExportNel::getName (MtlBase& mtl)
|
||||||
// Return its name
|
// Return its name
|
||||||
TSTR name;
|
TSTR name;
|
||||||
name=mtl.GetName();
|
name=mtl.GetName();
|
||||||
return std::string (name);
|
return std::string((const char*)name.ToUTF8());
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue