diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp index 30389d809..0ebf0161a 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_anim.cpp @@ -185,7 +185,7 @@ void CExportNel::addSSSTrack(CSSSBuild &ssBuilder, INode& node) if(note) { CSSSBuild::CKey ks; - ks.Value = std::string(note->note); + ks.Value = note->note.ToUTF8(); ks.Time= CExportNel::convertTime (note->time); bs.Track.push_back(ks); } @@ -224,7 +224,7 @@ NL3D::CTrackKeyFramerConstString* CExportNel::buildFromNoteTrack(INode& node) { firstDate = CExportNel::convertTime (note->time); } - ks.Value = std::string(note->note); + ks.Value = note->note.ToUTF8(); lastDate = CExportNel::convertTime (note->time); st->addKey(ks , lastDate ); diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp index 8f7957175..f7c8135ad 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp @@ -768,7 +768,7 @@ void CExportNel::buildAMaterial (NL3D::CMaterial& material, CMaxMaterialInfo& ma // Set material name TSTR name=mtl.GetName(); - materialInfo.MaterialName = (const char*)name; + materialInfo.MaterialName = name.ToUTF8(); } else { @@ -1120,7 +1120,7 @@ void CExportNel::buildAMaterial (NL3D::CMaterial& material, CMaxMaterialInfo& ma // Set material name TSTR name=mtl.GetName(); - materialInfo.MaterialName = (const char*)name; + materialInfo.MaterialName = name.ToUTF8(); } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp index 0a2e95242..6d0744dee 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp @@ -579,7 +579,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vectorGetName (); + string originalName = (*lib)[i]->GetName ().ToUTF8(); renameMap.insert (map::value_type (newName, originalName)); (*lib)[i]->SetName (utf8ToTStr(newName)); } @@ -604,7 +604,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vectorGetName (); + string key = (*lib)[i]->GetName ().ToUTF8(); map::iterator ite = renameMap.find (key); // Not found ? This is a merged material @@ -612,7 +612,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vectorGetName (); + string originalName = (*lib)[i]->GetName ().ToUTF8(); renameMap.insert (map::value_type (newName, originalName)); (*lib)[i]->SetName (utf8ToTStr(newName)); } @@ -622,7 +622,7 @@ static bool BuildMeshInterfaces(const char *cMaxFileName, std::vectorGetName (); + string key = (*lib)[i]->GetName ().ToUTF8(); map::iterator ite = renameMap.find (key); if (ite != renameMap.end ()) { diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index a7631c05a..908d87c6d 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp @@ -223,7 +223,7 @@ Animatable* CExportNel::getSubAnimByName (Animatable& node, const char* sName) TSTR sSubName=node.SubAnimName(nSub); // Good name? - if (strcmp (sSubName, sName)==0) + if (strcmp (sSubName.ToUTF8(), sName)==0) { // ok, return this subanim return node.SubAnim(nSub); @@ -288,7 +288,7 @@ Control* CExportNel::getControlerByName (Animatable& node, const char* sName) { // Sub anim name TSTR name=node.SubAnimName (s); - if (strcmp (name, sName)==0) + if (strcmp (name.ToUTF8(), sName)==0) { // Get the controller pointer of this sub anim Control* c=GetControlInterface (node.SubAnim(s)); @@ -502,7 +502,7 @@ std::string CExportNel::getName (MtlBase& mtl) // Return its name TSTR name; name=mtl.GetName(); - return std::string (name); + return std::string((const char*)name.ToUTF8()); } // --------------------------------------------------