diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp index a44167294..fdedc9a3d 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp @@ -354,7 +354,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP if (RPO::isZone (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) @@ -372,7 +372,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP else if (CExportNel::isVegetable (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) @@ -391,7 +391,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP else if (CExportNel::isLodCharacter (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) @@ -410,7 +410,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP else if (CExportNel::isMesh (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms index a3b28bc02..590dcab75 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms @@ -26,6 +26,26 @@ NEL3D_APPDATA_COLLISION = 1423062613 NEL3D_APPDATA_COLLISION_EXTERIOR = 1423062614 NEL3D_APPDATA_AUTOMATIC_ANIMATION = 1423062617 +-- Lower case +fn lowercase instring = +( + local upper, lower, outstring + upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ" + lower="abcdefghijklmnopqrstuvwxyz" + + outstring = copy instring + + for iii = 1 to outstring.count do + ( + jjj = findString upper outstring[iii] + if (jjj != undefined) then + outstring[iii] = lower[jjj] + else + outstring[iii] = instring[iii] + ) + return outstring -- value of outstring will be returned as function result +) + -- This node is n accelerator ? fn isAccelerator node = ( @@ -287,9 +307,9 @@ fn runNelMaxExportSub inputMaxFile retryCount = ( -- Output directory if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithCoarseMesh%/" + lowercase(node.name) + ".shape") else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithoutCoarseMesh%/" + lowercase(node.name) + ".shape") -- Compare file date if (NeLTestFileDate output inputMaxFile) == true then diff --git a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms index 375fe8eea..9df535d1d 100755 --- a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms +++ b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms @@ -102,6 +102,26 @@ NEL3D_APPDATA_COLLISION = 1423062613 NEL3D_APPDATA_COLLISION_EXTERIOR = 1423062614 NEL3D_APPDATA_AUTOMATIC_ANIMATION = 1423062617 +-- Lower case +fn lowercase instring = +( + local upper, lower, outstring + upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ" + lower="abcdefghijklmnopqrstuvwxyz" + + outstring = copy instring + + for iii = 1 to outstring.count do + ( + jjj = findString upper outstring[iii] + if (jjj != undefined) then + outstring[iii] = lower[jjj] + else + outstring[iii] = instring[iii] + ) + return outstring -- value of outstring will be returned as function result +) + -- This node is n accelerator ? fn isAccelerator node = ( @@ -363,9 +383,9 @@ fn runNelMaxExportSub inputMaxFile retryCount = ( -- Output directory if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithCoarseMesh%/" + lowercase(node.name) + ".shape") else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithoutCoarseMesh%/" + lowercase(node.name) + ".shape") -- Compare file date if (NeLTestFileDate output inputMaxFile) == true then