From 2cd74c193f6f58c143fbeee70a22a18901fe9a61 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 16 Aug 2014 14:51:29 +0200 Subject: [PATCH 01/11] Zone light exporter adjust --- code/nel/tools/build_gamedata/all_install_dev.bat | 9 +++++++++ .../build_gamedata/processes/zone_light/1_export.py | 1 + 2 files changed, 10 insertions(+) create mode 100644 code/nel/tools/build_gamedata/all_install_dev.bat diff --git a/code/nel/tools/build_gamedata/all_install_dev.bat b/code/nel/tools/build_gamedata/all_install_dev.bat new file mode 100644 index 000000000..6791bbea0 --- /dev/null +++ b/code/nel/tools/build_gamedata/all_install_dev.bat @@ -0,0 +1,9 @@ +title Ryzom Core: 3_install.py +3_install.py +title Ryzom Core: a1_worldedit_data.py +a1_worldedit_data.py +title Ryzom Core: b1_client_dev.py +b1_client_dev.py +title Ryzom Core: b2_shard_data.py +b2_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/processes/zone_light/1_export.py b/code/nel/tools/build_gamedata/processes/zone_light/1_export.py index cede7d658..615a4dffa 100755 --- a/code/nel/tools/build_gamedata/processes/zone_light/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/1_export.py @@ -55,6 +55,7 @@ for dir in WaterMapSourceDirectories: destDir = DatabaseDirectory + "/" + dir mkPath(log, destDir) copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".tga") + copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".png") printLog(log, "") log.close() From 4d4a885f7a538ce5e9a71535054e244372d16183 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 16 Aug 2014 14:51:29 +0200 Subject: [PATCH 02/11] Maxscript selection clear fix --- .../build_gamedata/generators/max_exporter_scripts/clod.ms | 1 + .../build_gamedata/generators/max_exporter_scripts/cmb.ms | 1 + .../tools/build_gamedata/generators/max_exporter_scripts/ig.ms | 2 ++ .../generators/max_exporter_scripts/pacs_prim.ms | 1 + .../build_gamedata/generators/max_exporter_scripts/shape.ms | 1 + .../build_gamedata/generators/max_exporter_scripts/veget.ms | 1 + .../build_gamedata/generators/max_exporter_scripts/zone.ms | 1 + .../build_gamedata/processes/clodbank/maxscript/clod_export.ms | 1 + .../tools/build_gamedata/processes/ig/maxscript/ig_export.ms | 2 ++ .../build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms | 3 +++ .../processes/pacs_prim/maxscript/pacs_prim_export.ms | 1 + .../build_gamedata/processes/rbank/maxscript/cmb_export.ms | 1 + .../build_gamedata/processes/shape/maxscript/shape_export.ms | 1 + .../build_gamedata/processes/veget/maxscript/veget_export.ms | 1 + .../build_gamedata/processes/zone/maxscript/zone_export.ms | 1 + 15 files changed, 19 insertions(+) diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms index 29744c7d1..68c8455d6 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms @@ -56,6 +56,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms index 2a7492c29..40feab761 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms @@ -36,6 +36,7 @@ fn runNelMaxExport inputMaxFile = -- Select all collision mesh max select none + clearSelection() for m in geometry do ( if (isToBeExported m) == true then diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms index 7c9563088..df0ecf7fc 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms @@ -61,6 +61,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 @@ -109,6 +110,7 @@ fn runNelMaxExport inputMaxFile = ( -- Select none max select none + clearSelection() -- Select all node in this ig for node in geometry do diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms index 93e94de19..ea730c0b4 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms @@ -10,6 +10,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Select all PACS primitives for i in geometry do 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 c1f4761ff..d8d6c8d9d 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 @@ -199,6 +199,7 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms index f0d5cd584..22c49013a 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms @@ -46,6 +46,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms index d4ecbe275..338d48733 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms @@ -40,6 +40,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Found it ? find = false diff --git a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms index f01a973e4..a8693dc8a 100755 --- a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms +++ b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms @@ -122,6 +122,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms index 526d06dc8..65cb38c4a 100755 --- a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms +++ b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms @@ -127,6 +127,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 @@ -175,6 +176,7 @@ fn runNelMaxExport inputMaxFile = ( -- Select none max select none + clearSelection() -- Select all node in this ig for node in geometry do diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index 4b25c1427..933468459 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -228,6 +228,7 @@ fn exportCollisionsFromZone outputNelDir filename = ( -- Select all collision mesh max select none + clearSelection() for m in geometry do ( if (isToBeExportedCollision m) == true then @@ -311,6 +312,7 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi -- unselect max select none + clearSelection() -- Exported object count exported = 0 @@ -372,6 +374,7 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi ( -- Select none max select none + clearSelection() for node in objects where classOf node == XRefObject do ( diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms index ddfc0014a..750af80d9 100755 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms @@ -76,6 +76,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Select all PACS primitives for i in geometry do diff --git a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms index 74cf3a8dd..59b444db3 100755 --- a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms +++ b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms @@ -102,6 +102,7 @@ fn runNelMaxExport inputMaxFile = -- Select all collision mesh max select none + clearSelection() for m in geometry do ( if (isToBeExported m) == 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 e979f6b0d..16c6dcec9 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 @@ -265,6 +265,7 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms index 828a78d42..cbc2f2177 100755 --- a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms +++ b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms @@ -112,6 +112,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms index 71f63e45b..3a0ebf8fe 100755 --- a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms +++ b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms @@ -103,6 +103,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Found it ? find = false From 4f4a3469d372c9084a68899fd90d10fc0d7c1df4 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 17 Aug 2014 15:39:30 +0200 Subject: [PATCH 03/11] Fixed #172 XML floating point serialization not using neutral culture --- code/nel/include/nel/misc/i_xml.h | 3 +++ code/nel/src/misc/i_xml.cpp | 43 +++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/misc/i_xml.h b/code/nel/include/nel/misc/i_xml.h index a9452e341..cf2527e21 100644 --- a/code/nel/include/nel/misc/i_xml.h +++ b/code/nel/include/nel/misc/i_xml.h @@ -232,6 +232,9 @@ private: // If not NULL, binary mode detected, use this stream in serials IStream *_BinaryStream; + + // System dependant structure for locale + void* _Locale; }; diff --git a/code/nel/src/misc/i_xml.cpp b/code/nel/src/misc/i_xml.cpp index d8925ddef..3b7f0f9e2 100644 --- a/code/nel/src/misc/i_xml.cpp +++ b/code/nel/src/misc/i_xml.cpp @@ -24,6 +24,11 @@ // Include from libxml2 #include +#if defined(NL_OS_WINDOWS) && defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 80 +#define USE_LOCALE_ATOF +#include +#endif + using namespace std; #define NLMISC_READ_BUFFER_SIZE 1024 @@ -46,6 +51,22 @@ const char SEPARATOR = ' '; serialSeparatedBufferIn( number_as_string ); \ dest = (thetype)convfunc( number_as_string.c_str() ); +#ifdef USE_LOCALE_ATOF + +#define readnumberlocale(dest,thetype,digits,convfunc) \ + string number_as_string; \ + serialSeparatedBufferIn( number_as_string ); \ + dest = (thetype)convfunc( number_as_string.c_str(), (_locale_t)_Locale ); + +#define nl_atof _atof_l + +#else + +#define readnumberlocale(dest,thetype,digits,convfunc) readnumber(dest,thetype,digits,convfunc) +#define nl_atof atof + +#endif + // *************************************************************************** inline void CIXml::flushContentString () @@ -70,6 +91,13 @@ CIXml::CIXml () : IStream (true /* Input mode */) _ErrorString = ""; _TryBinaryMode = false; _BinaryStream = NULL; + +#ifdef USE_LOCALE_ATOF + // create C numeric locale + _Locale = _create_locale(LC_NUMERIC, "C"); +#else + _Locale = NULL; +#endif } // *************************************************************************** @@ -85,6 +113,13 @@ CIXml::CIXml (bool tryBinaryMode) : IStream (true /* Input mode */) _ErrorString = ""; _TryBinaryMode = tryBinaryMode; _BinaryStream = NULL; + +#ifdef USE_LOCALE_ATOF + // create C numeric locale + _Locale = _create_locale(LC_NUMERIC, "C"); +#else + _Locale = NULL; +#endif } // *************************************************************************** @@ -119,6 +154,10 @@ void CIXml::release () _ErrorString = ""; resetPtrTable(); + +#ifdef USE_LOCALE_ATOF + if (_Locale) _free_locale((_locale_t)_Locale); +#endif } // *************************************************************************** @@ -546,7 +585,7 @@ void CIXml::serial(float &b) } else { - readnumber( b, float, 128, atof ); + readnumberlocale( b, float, 128, nl_atof ); } } @@ -560,7 +599,7 @@ void CIXml::serial(double &b) } else { - readnumber( b, double, 128, atof ); + readnumberlocale( b, double, 128, nl_atof ); } } From 7c328658fbc724abdfc2c919c0e688d1ca5046d5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Aug 2014 15:58:42 +0200 Subject: [PATCH 04/11] Fix continent path bug --- code/nel/tools/3d/zone_lighter/zone_lighter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp index 9b6df0900..1add65a9d 100644 --- a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp +++ b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp @@ -202,7 +202,7 @@ static void loadIGFromContinent(NLMISC::CConfigFile ¶meter, std::list Date: Sun, 17 Aug 2014 16:02:51 +0200 Subject: [PATCH 05/11] Additional fix #172 set _Locale to NULL after release --- code/nel/src/misc/i_xml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/src/misc/i_xml.cpp b/code/nel/src/misc/i_xml.cpp index 3b7f0f9e2..8a624dd5f 100644 --- a/code/nel/src/misc/i_xml.cpp +++ b/code/nel/src/misc/i_xml.cpp @@ -157,6 +157,7 @@ void CIXml::release () #ifdef USE_LOCALE_ATOF if (_Locale) _free_locale((_locale_t)_Locale); + _Locale = NULL; #endif } From 74a30afcc4579ea0cb127ebbf01af8547b01c37c Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 17 Aug 2014 16:05:51 +0200 Subject: [PATCH 06/11] Changed #172 XML floating point serialization not using neutral culture --- code/nel/src/misc/i_xml.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/src/misc/i_xml.cpp b/code/nel/src/misc/i_xml.cpp index 3b7f0f9e2..ee3f39a89 100644 --- a/code/nel/src/misc/i_xml.cpp +++ b/code/nel/src/misc/i_xml.cpp @@ -128,6 +128,10 @@ CIXml::~CIXml () { // Release release (); + +#ifdef USE_LOCALE_ATOF + if (_Locale) _free_locale((_locale_t)_Locale); +#endif } // *************************************************************************** @@ -154,10 +158,6 @@ void CIXml::release () _ErrorString = ""; resetPtrTable(); - -#ifdef USE_LOCALE_ATOF - if (_Locale) _free_locale((_locale_t)_Locale); -#endif } // *************************************************************************** From 6e4a14740c98ffea40992abd2e2b1468533009b2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Aug 2014 16:22:56 +0200 Subject: [PATCH 07/11] Crashfix in case pacs_prim are exported into .ig --- code/nel/tools/3d/zone_lighter/zone_lighter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp index 1add65a9d..b3c6807c1 100644 --- a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp +++ b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp @@ -699,6 +699,12 @@ int main(int argc, char* argv[]) if(group->getInstance(instance).DontCastShadow || group->getInstance(instance).DontCastShadowForExterior) continue; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // PS ? if (toLower (CFile::getExtension (name)) == "ps") continue; From ef9a0d818402e77e6b9ca76d121ca9d352f0dd4c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Aug 2014 16:41:09 +0200 Subject: [PATCH 08/11] Crashfix in case pacs_prim are exported into .ig --- code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp b/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp index 0010d5179..a6636730f 100644 --- a/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp +++ b/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp @@ -410,6 +410,12 @@ int main(int argc, char* argv[]) if(group->getInstance(instance).DontCastShadow || group->getInstance(instance).DontCastShadowForExterior) continue; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // Add a .shape at the end ? if (!name.empty()) { From 45db7f57eba9a1824db88c002456685cc76e489b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Aug 2014 16:48:51 +0200 Subject: [PATCH 09/11] Crashfix in case pacs_prim are exported into .ig --- code/nel/src/3d/instance_lighter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/src/3d/instance_lighter.cpp b/code/nel/src/3d/instance_lighter.cpp index f754ebb8b..d21f80e4e 100644 --- a/code/nel/src/3d/instance_lighter.cpp +++ b/code/nel/src/3d/instance_lighter.cpp @@ -408,6 +408,12 @@ void CInstanceLighter::light (const CInstanceGroup &igIn, CInstanceGroup &igOut, string name= _Instances[i].Name; bool shapeFound= true; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // Try to find the shape in the UseShapeMap. std::map::const_iterator iteMap= lightDesc.UserShapeMap.find (name); From 0fdba798198941247b0276c3578191ab16da989b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Aug 2014 19:37:20 +0200 Subject: [PATCH 10/11] Crashfix in case pacs_prim are exported into .ig --- code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp b/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp index 4365eab9b..8286a10e6 100644 --- a/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp +++ b/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp @@ -167,6 +167,12 @@ void CIgLighterLib::lightIg(CInstanceLighter &instanceLighter, string name= igIn.getShapeName(i); bool shapeFound= true; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // Try to find the shape in the UseShapeMap. std::map::const_iterator iteMap= lightDesc.UserShapeMap.find (name); From 98fadea8bf2d30785935efb1007446f62cd8dbdc Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 17 Aug 2014 19:40:43 +0200 Subject: [PATCH 11/11] Fix shape lightmap optimize --- code/nel/tools/build_gamedata/processes/shape/0_setup.py | 1 + code/nel/tools/build_gamedata/processes/shape/2_build.py | 7 +++++-- code/nel/tools/build_gamedata/processes/shape/3_install.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/build_gamedata/processes/shape/0_setup.py b/code/nel/tools/build_gamedata/processes/shape/0_setup.py index 71dfd097e..941d07531 100755 --- a/code/nel/tools/build_gamedata/processes/shape/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/shape/0_setup.py @@ -69,6 +69,7 @@ if BuildShadowSkinEnabled: printLog(log, ">>> Setup build directories <<<") mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) diff --git a/code/nel/tools/build_gamedata/processes/shape/2_build.py b/code/nel/tools/build_gamedata/processes/shape/2_build.py index 48a658378..1a9f668f8 100755 --- a/code/nel/tools/build_gamedata/processes/shape/2_build.py +++ b/code/nel/tools/build_gamedata/processes/shape/2_build.py @@ -77,16 +77,19 @@ else: # copy lightmap_not_optimized to lightmap printLog(log, ">>> Optimize lightmaps <<<") loPathLightmapsOriginal = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory +loPathShapesOriginal = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory mkPath(log, loPathLightmapsOriginal) loPathLightmaps = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory -loPathShapes = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory +loPathShapes = ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory loPathTags = ExportBuildDirectory + "/" + ShapeTagExportDirectory mkPath(log, loPathLightmaps) mkPath(log, loPathShapes) mkPath(log, loPathTags) -if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps): +if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapesOriginal, loPathShapes) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps): removeFilesRecursive(log, loPathLightmaps) copyFiles(log, loPathLightmapsOriginal, loPathLightmaps) + removeFilesRecursive(log, loPathShapes) + copyFiles(log, loPathShapesOriginal, loPathShapes) # Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits # lightmap_optimizer [path_tags] [path_flag8bit] subprocess.call([ LightmapOptimizer, loPathLightmaps, loPathShapes, loPathTags, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt" ]) diff --git a/code/nel/tools/build_gamedata/processes/shape/3_install.py b/code/nel/tools/build_gamedata/processes/shape/3_install.py index cb93a443b..f6265a1a6 100755 --- a/code/nel/tools/build_gamedata/processes/shape/3_install.py +++ b/code/nel/tools/build_gamedata/processes/shape/3_install.py @@ -46,8 +46,8 @@ printLog(log, "") printLog(log, ">>> Install shape <<<") installPath = InstallDirectory + "/" + ShapeInstallDirectory mkPath(log, installPath) -mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, installPath, ".shape") +mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory, installPath, ".shape") mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape") copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds")