From 59cf1cf562252db96f453baa16e1d6b52cf934e3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 28 Apr 2019 16:48:02 +0800 Subject: [PATCH] Fix again for Max 2020 --- .../nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h | 4 ++-- .../3d/plugin_max/nel_export/nel_export_node_properties.cpp | 2 +- code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp | 2 +- code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h index 7b046abbd..72ae6adee 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/string_common.h @@ -38,7 +38,7 @@ static TSTR MaxTStrFromUtf8(const std::string &src) uc.fromUtf8(src); dst = (const mwchar_t *)uc.c_str(); #else - dst.FromUTF8(source); + dst.FromUTF8(src.c_str()); #endif return dst; } @@ -55,7 +55,7 @@ static std::string MaxTStrToUtf8(const TSTR& src) return uc.toUtf8(); #endif #else - return src.ToUTF8(); + return src.ToUTF8().data(); #endif } diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp index efaa43238..71cde82a5 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp @@ -2493,7 +2493,7 @@ INT_PTR CALLBACK LodDialogCallback ( // Window text TSTR winName = (*(currentParam->ListNode->begin()))->GetName(); - winName = TSTR("Node properties (") + winName + ((currentParam->ListNode->size() > 1) ? _M(" ...)") : _M(")")); + winName = TSTR(_M("Node properties (")) + winName + ((currentParam->ListNode->size() > 1) ? _M(" ...)") : _M(")")); SetWindowText(hwndDlg, winName.data()); // Move dialog diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp index 031596932..30d1f929c 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp @@ -2530,7 +2530,7 @@ bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshB // Add lightmap information in the lightmap log COFile outputLog; if (outputLightmapLog) - createLightmapLog(outputLog, gOptions.sExportLighting.c_str(), ucstring(projectName).toUtf8().c_str(), CStr(ZeNode.GetName()).data()); + createLightmapLog(outputLog, gOptions.sExportLighting.c_str(), ucstring(projectName).toUtf8().c_str(), MaxTStrToUtf8(ZeNode.GetName()).c_str()); // Update UV coords to Texture space PutFaceUV1InTextureCoord( LightMap.w, LightMap.h, AllFaces.begin(), AllFaces.size() ); diff --git a/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h index 15d477d3b..0f4ead01c 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo.h @@ -206,7 +206,7 @@ class RPO : public PatchObject ? true : PatchObject::IsSubClassOf(classID); } SClass_ID SuperClassID() { return GEOMOBJECT_CLASS_ID; } - void GetClassName(TSTR& s) { s = "Rykol Patch Object";} + void GetClassName(TSTR& s) { s = _T("Rykol Patch Object");} RefTargetHandle Clone ( RemapDir &remap ); RefResult NotifyRefChanged (NOTIFY_REF_PARAMS);