From 6e3827928be0716a69f78241913364ea3ca3da4a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 28 Jul 2014 18:31:20 +0200 Subject: [PATCH 01/28] Adjust 3ds Max plugin versioning info --- .../3d/plugin_max/nel_export/nel_export.rc | 14 ++++++------- .../nel_patch_converter.rc | 10 ++++----- .../3d/plugin_max/nel_patch_edit/mods.rc | 15 ++++++------- .../nel_patch_paint/nel_patch_paint.rc | 17 ++++++++------- .../vertex_tree_paint.rc | 21 ++++++++++--------- .../plugin_max/tile_utility/tile_utility.rc | 13 ++++++------ 6 files changed, 47 insertions(+), 43 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc index a2f49f0da..0b38b4678 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc @@ -575,8 +575,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1, 0, 0, 117 - PRODUCTVERSION 3,0,0,0 + FILEVERSION 0, 9, 0, 0 + PRODUCTVERSION 0, 9, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -591,16 +591,16 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "TECH: \0" - VALUE "CompanyName", "\0" - VALUE "FileVersion", "1, 0, 0, 117\0" + VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" + VALUE "CompanyName", "Ryzom Core\0" + VALUE "FileVersion", "0.9.0\0" VALUE "InternalName", "CNelExport\0" VALUE "LegalCopyright", "\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "CNelExport.dlu\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "3D Studio MAX\0" - VALUE "ProductVersion", "3.0.0.0\0" + VALUE "ProductName", "Ryzom Core\0" + VALUE "ProductVersion", "0.9.0\0" VALUE "SpecialBuild", "\0" END END diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc index 619028a99..ab41bf934 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc @@ -85,8 +85,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,0,0 - PRODUCTVERSION 0,6,0,0 + FILEVERSION 0, 9, 0, 0 + PRODUCTVERSION 0, 9, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -101,14 +101,14 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "http://www.opennel.org/" + VALUE "Comments", "http://www.ryzomcore.org/" VALUE "FileDescription", "PatchMesh to RykolPatchMesh" - VALUE "FileVersion", "0.6.0" + VALUE "FileVersion", "0.9.0" VALUE "InternalName", "PatchMesh to RykolPatchMesh" VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd." VALUE "OriginalFilename", "nel_convert_patch.dlm" VALUE "ProductName", "NeL Patch Converter" - VALUE "ProductVersion", "0.6.0" + VALUE "ProductVersion", "0.9.0" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc index 324c82139..6b27041de 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc @@ -514,8 +514,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,50 - PRODUCTVERSION 3,0,0,0 + FILEVERSION 0, 9, 0, 0 + PRODUCTVERSION 0, 9, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -530,15 +530,16 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "Nevrax Ltd." - VALUE "FileDescription", "Standard modifiers (plugin)" - VALUE "FileVersion", "1, 0, 0, 50" + VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" + VALUE "CompanyName", "Ryzom Core" + VALUE "FileDescription", "NeL Patch Edit" + VALUE "FileVersion", "0.9.0" VALUE "InternalName", "neleditpatch" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc." VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF." VALUE "OriginalFilename", "neleditpatch.dlm" - VALUE "ProductName", "3D Studio MAX" - VALUE "ProductVersion", "3.0.0.0" + VALUE "ProductName", "Ryzom Core" + VALUE "ProductVersion", "0.9.0" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc index c984f2541..cad261814 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc @@ -96,8 +96,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1, 0, 0, 51 - PRODUCTVERSION 3,0,0,0 + FILEVERSION 0, 9, 0, 0 + PRODUCTVERSION 0, 9, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -112,17 +112,18 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN + VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "Comments", "TECH: cyril.corvazier\0" - VALUE "CompanyName", "Nevrax Ltd\0" - VALUE "FileDescription", "Standard modifiers (plugin)\0" - VALUE "FileVersion", "1, 0, 0, 51\0" + VALUE "CompanyName", "Ryzom Core\0" + VALUE "FileDescription", "NeL Patch Paint\0" + VALUE "FileVersion", "0.9.0\0" VALUE "InternalName", "mods\0" - VALUE "LegalCopyright", "Copyright © 1998 Nevrax Ltd\0" + VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nelpatchpaint.dlm\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "3D Studio MAX\0" - VALUE "ProductVersion", "3.0.0.0\0" + VALUE "ProductName", "Ryzom Core\0" + VALUE "ProductVersion", "0.9.0\0" VALUE "SpecialBuild", "\0" END END diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc index bb9d2cce7..b69f43106 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc @@ -125,8 +125,8 @@ IDC_DROPPER_CURSOR CURSOR DISCARDABLE "dropcurs.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,1,0,0 - PRODUCTVERSION 3,1,0,0 + FILEVERSION 0, 9, 0, 0 + PRODUCTVERSION 0, 9, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -141,16 +141,17 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "TECH: Christer Janson\0" - VALUE "CompanyName", "Kinetix, a division of Autodesk, Inc.\0" - VALUE "FileDescription", "Vertex Color Paint (plugin)\0" - VALUE "FileVersion", "3.1.0.0\0" - VALUE "InternalName", "VertexPaint\0" - VALUE "LegalCopyright", "Copyright © 1998 Autodesk Inc.\0" + VALUE "Comments", "Based on Kinetix 3D Studio Max 3.1 plugin sample\0" + VALUE "Comments", "TECH: \0" + VALUE "CompanyName", "Ryzom Core\0" + VALUE "FileDescription", "Vertex Tree Paint\0" + VALUE "FileVersion", "0.9.0\0" + VALUE "InternalName", "VertexTreePaint\0" + VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0" VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0" VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0" - VALUE "ProductName", "3D Studio MAX\0" - VALUE "ProductVersion", "3.1.0.0\0" + VALUE "ProductName", "Ryzom Core\0" + VALUE "ProductVersion", "0.9.0\0" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc index f727c9bf2..c3125ebaf 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc @@ -124,8 +124,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1, 0, 0, 56 - PRODUCTVERSION 3,0,0,0 + FILEVERSION 0, 9, 0, 0 + PRODUCTVERSION 0, 9, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -140,13 +140,14 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "\0" - VALUE "FileVersion", "1, 0, 0, 56\0" + VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" + VALUE "CompanyName", "Ryzom Core\0" + VALUE "FileVersion", "0.9.0\0" VALUE "InternalName", "Tile_utility\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Tile_utility.dlu\0" - VALUE "ProductName", "3D Studio MAX\0" - VALUE "ProductVersion", "3.0.0.0\0" + VALUE "ProductName", "Ryzom Core\0" + VALUE "ProductVersion", "0.9.0\0" VALUE "FileDescription", "Create material for tiles\0" VALUE "Comments", "TECH: \0" VALUE "LegalTrademarks", "\0" From 3b4e1a32cbb49d3fdac1d535cdcde7bcbfeae209 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 28 Jul 2014 18:31:40 +0200 Subject: [PATCH 02/28] Fix NeL Material script defaults, fix #166 --- .../3d/plugin_max/scripts/startup/nel_material.ms | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms b/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms index 06021c45f..ca1a30fe0 100644 --- a/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms +++ b/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms @@ -545,7 +545,7 @@ plugin material NelMaterial rollout nelBasicParameters "NeL Basic Parameters" rolledUp:false ( Label lblNlbpA "NeL Material" align:#center across:3 - Label lblNlbpB "http://dev.ryzom.com/" align:#center + Label lblNlbpB "http://www.ryzomcore.org/" align:#center CheckBox cbTwoSided "2-Sided" checked:false align:#right group "Standard Lighting" @@ -2211,6 +2211,18 @@ plugin material NelMaterial on create do ( + -- Load from Standard + bTwoSided = delegate.twoSided + cAmbient = delegate.ambient + cDiffuse = delegate.diffuse + pOpacity = delegate.opacity + cSpecular = delegate.specular + pSpecularLevel = delegate.specularLevel + pGlossiness = delegate.glossiness + cSelfIllumColor = delegate.selfIllumColor + pSelfIllumAmount = delegate.selfIllumAmount + bUseSelfIllumColor = delegate.useSelfIllumColor + -- Single shader loadShader ShaderSingleTexture ) From 12aa02585f5dc456f728d04686755defaff039b1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 28 Jul 2014 18:32:05 +0200 Subject: [PATCH 03/28] Fix self illumination color widget in NeL Material script --- code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms b/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms index ca1a30fe0..95c76c894 100644 --- a/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms +++ b/code/nel/tools/3d/plugin_max/scripts/startup/nel_material.ms @@ -595,7 +595,7 @@ plugin material NelMaterial cpSelfIllumColor.visible = bUseSelfIllumColor ) else - ( + ( bTwoSided = cbTwoSided.checked cAmbient = cpAmbient.color cDiffuse = cpDiffuse.color @@ -607,6 +607,9 @@ plugin material NelMaterial pSelfIllumAmount = spSelfIllumAmount.value bUseSelfIllumColor = cbUseSelfIllumColor.checked + spSelfIllumAmount.visible = not cbUseSelfIllumColor.checked + cpSelfIllumColor.visible = cbUseSelfIllumColor.checked + delegate.twoSided = bTwoSided delegate.ambient = cAmbient delegate.diffuse = cDiffuse From 5930d3b38446fc2a3492891f7241d718a3ca000f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 28 Jul 2014 22:15:09 +0200 Subject: [PATCH 04/28] Backed out changeset: 7bdb27443f88 --- code/ryzom/client/src/main_loop.cpp | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index bd5112f99..4547ea591 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -688,22 +688,26 @@ void updateWeather() } #endif - // FIXME: temporary fix for teleportation crash // Update new sky - if (ContinentMngr.cur() && Driver->getPolygonMode() == UDriver::Filled && Filter3D[FilterSky]) + if (ContinentMngr.cur() && !ContinentMngr.cur()->Indoor) { - CSky &sky = ContinentMngr.cur()->CurrentSky; - - if (!ContinentMngr.cur()->Indoor && sky.getScene()) + if(Driver->getPolygonMode() == UDriver::Filled) { - s_SkyMode = NewSky; - sky.getScene()->animate(TimeInSec-FirstTimeInSec); - // Setup the sky camera - preRenderNewSky(); - } - else - { - s_SkyMode = OldSky; + if (Filter3D[FilterSky]) + { + CSky &sky = ContinentMngr.cur()->CurrentSky; + if (sky.getScene()) + { + s_SkyMode = NewSky; + sky.getScene()->animate(TimeInSec-FirstTimeInSec); + // Setup the sky camera + preRenderNewSky(); + } + else + { + s_SkyMode = OldSky; + } + } } } } From f724d137003e43dfdb02484f80f69fe696d4cd85 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 28 Jul 2014 22:16:41 +0200 Subject: [PATCH 05/28] Fix #71 --- code/ryzom/client/src/main_loop.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index 4547ea591..0d000310d 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -689,6 +689,7 @@ void updateWeather() #endif // Update new sky + s_SkyMode = NoSky; if (ContinentMngr.cur() && !ContinentMngr.cur()->Indoor) { if(Driver->getPolygonMode() == UDriver::Filled) From b9dc8ace7eae14846822152c7717869b5542d361 Mon Sep 17 00:00:00 2001 From: KISHAN GRIMOUT Date: Wed, 16 Jul 2014 13:47:08 +0200 Subject: [PATCH 06/28] fix windows 64-bit crash in client due to VS 64-bit compiler bug, fix #164 --- code/nel/include/nel/3d/particle_system.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/nel/include/nel/3d/particle_system.h b/code/nel/include/nel/3d/particle_system.h index c1139d070..68f67ae6d 100644 --- a/code/nel/include/nel/3d/particle_system.h +++ b/code/nel/include/nel/3d/particle_system.h @@ -1178,9 +1178,6 @@ private: CPSMultiMap::M TLBMap; TLBMap _LBMap; - float _AutoLODStartDistPercent; - uint8 _AutoLODDegradationExponent; - CPSAttribMaker *_ColorAttenuationScheme; NLMISC::CRGBA _GlobalColor; NLMISC::CRGBA _GlobalColorLighted; @@ -1206,6 +1203,11 @@ private: bool _HiddenAtCurrentFrame : 1; bool _HiddenAtPreviousFrame : 1; + // The two following members have been moved after the bitfield to workaround a MSVC 64-bit compiler bug (fixed in VS2013) + // For more info, see: http://connect.microsoft.com/VisualStudio/feedback/details/777184/c-compiler-bug-vtable-pointer-put-at-wrong-offset-in-64-bit-mode + float _AutoLODStartDistPercent; + uint8 _AutoLODDegradationExponent; + static bool _SerialIdentifiers; static bool _ForceDisplayBBox; From 0d2fc4696f5225828a05b8b39923bbe6bf579649 Mon Sep 17 00:00:00 2001 From: nimetu Date: Mon, 28 Jul 2014 23:51:25 +0200 Subject: [PATCH 07/28] Crafted tool durability, fix #156 --- .../game_item_manager/game_item.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp index 75ae81f04..30ff4acae 100644 --- a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp +++ b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp @@ -2895,13 +2895,13 @@ uint32 CGameItem::maxDurability() const // tools // SHEARS = pick for forage - case ITEM_TYPE::SHEARS: return (uint32)CWeaponCraftParameters::ForageToolDurability; - case ITEM_TYPE::AmmoTool: return (uint32)CWeaponCraftParameters::AmmoCraftingToolDurability; - case ITEM_TYPE::ArmorTool: return (uint32)CWeaponCraftParameters::ArmorCraftingToolDurability; - case ITEM_TYPE::JewelryTool: return (uint32)CWeaponCraftParameters::JewelryCraftingToolDurability; - case ITEM_TYPE::MeleeWeaponTool:return (uint32)CWeaponCraftParameters::MeleeWeaponCraftingToolDurability; - case ITEM_TYPE::RangeWeaponTool:return (uint32)CWeaponCraftParameters::RangeWeaponCraftingToolDurability; - case ITEM_TYPE::ToolMaker: return (uint32)CWeaponCraftParameters::ToolCraftingToolDurability; + case ITEM_TYPE::SHEARS: d = CWeaponCraftParameters::ForageToolDurability; break; + case ITEM_TYPE::AmmoTool: d = CWeaponCraftParameters::AmmoCraftingToolDurability; break; + case ITEM_TYPE::ArmorTool: d = CWeaponCraftParameters::ArmorCraftingToolDurability; break; + case ITEM_TYPE::JewelryTool: d = CWeaponCraftParameters::JewelryCraftingToolDurability; break; + case ITEM_TYPE::MeleeWeaponTool: d = CWeaponCraftParameters::MeleeWeaponCraftingToolDurability; break; + case ITEM_TYPE::RangeWeaponTool: d = CWeaponCraftParameters::RangeWeaponCraftingToolDurability; break; + case ITEM_TYPE::ToolMaker: d = CWeaponCraftParameters::ToolCraftingToolDurability; break; default: return 0; From 617d1235d1f95ded9d21a6db38ec7162de1b4ab8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 14:09:08 +0200 Subject: [PATCH 08/28] Compile fix --- code/nel/tools/3d/object_viewer/main_frame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/object_viewer/main_frame.cpp b/code/nel/tools/3d/object_viewer/main_frame.cpp index 83ba4ef7b..d063e202d 100644 --- a/code/nel/tools/3d/object_viewer/main_frame.cpp +++ b/code/nel/tools/3d/object_viewer/main_frame.cpp @@ -1392,9 +1392,9 @@ void CMainFrame::OnViewSetSceneRotation() if (sceneRotDlg.DoModal() == IDOK) { // read value. - NLMISC::fromString(sceneRotDlg.RotX, _LastSceneRotX); - NLMISC::fromString(sceneRotDlg.RotY, _LastSceneRotY); - NLMISC::fromString(sceneRotDlg.RotZ, _LastSceneRotZ); + _LastSceneRotX= (float)atof(sceneRotDlg.RotX); + _LastSceneRotY= (float)atof(sceneRotDlg.RotY); + _LastSceneRotZ= (float)atof(sceneRotDlg.RotZ); float rotx= degToRad(_LastSceneRotX); float roty= degToRad(_LastSceneRotY); float rotz= degToRad(_LastSceneRotZ); From 2b8e00698199823331ca1af698b09b7eecb1def2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 14:10:40 +0200 Subject: [PATCH 09/28] Initialize object viewer viewport at correct size --- code/nel/tools/3d/object_viewer/object_viewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index ff530e007..be4e6f1cd 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -676,9 +676,12 @@ bool CObjectViewer::initUI (HWND parent) view->MainFrame = _MainFrame; _MainFrame->ShowWindow (SW_SHOW); + + RECT viewportRect; + GetClientRect(view->m_hWnd, &viewportRect); // Init NELU - if (!CNELU::init (640, 480, viewport, 32, true, view->m_hWnd, false, _Direct3d)) + if (!CNELU::init (viewportRect.right, viewportRect.bottom, viewport, 32, true, view->m_hWnd, false, _Direct3d)) { return false; } From 9f19ade30cf2b6d2dda805ebb4a5679a714b47e9 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 14:25:28 +0200 Subject: [PATCH 10/28] Bugfix --- code/nel/tools/3d/object_viewer/object_viewer.cpp | 6 +++++- code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp | 2 ++ .../tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp | 2 ++ code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp | 2 ++ code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp | 2 ++ .../tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp | 2 ++ code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp | 2 ++ 7 files changed, 17 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index be4e6f1cd..d79090662 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -598,7 +598,11 @@ bool CObjectViewer::initUI (HWND parent) // initialize NeL context if needed if (!NLMISC::INelContext::isContextInitialised()) - new NLMISC::CApplicationContext; + { + new NLMISC::CApplicationContext(); + nldebug("NeL Object Viewer: initUI"); + NLMISC::CSheetId::initWithoutSheet(); + } // The fonts manager _FontManager.setMaxMemory(2000000); diff --git a/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp index 7378fc8ca..fcb2317fd 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/DllEntry.cpp @@ -20,6 +20,7 @@ #include "nel/misc/app_context.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include +#include "nel/misc/sheet_id.h" extern ClassDesc2* GetCNelExportDesc(); @@ -34,6 +35,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Export: DllMain"); + NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; // Hang on to this DLL's instance handle. diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp index 0fe5bc556..715e35618 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/DllEntry.cpp @@ -21,6 +21,7 @@ #include "nel/misc/app_context.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include +#include "nel/misc/sheet_id.h" extern ClassDesc2* GetPO2RPODesc(); extern ClassDesc* GetRPODesc(); @@ -44,6 +45,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Export: DllMain"); + NLMISC::CSheetId::initWithoutSheet(); } if(fdwReason == DLL_PROCESS_ATTACH) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp index 788c0d649..0d16dd149 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp @@ -18,6 +18,7 @@ #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include +#include "nel/misc/sheet_id.h" HINSTANCE hInstance; int controlsInit = FALSE; @@ -32,6 +33,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Patch Edit: DllMain"); + NLMISC::CSheetId::initWithoutSheet(); } if (fdwReason == DLL_PROCESS_ATTACH) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp index e0ae7c0fa..7afde8938 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp @@ -4,6 +4,7 @@ #include "nel/misc/app_context.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include +#include "nel/misc/sheet_id.h" HINSTANCE hInstance; int controlsInit = FALSE; @@ -18,6 +19,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Patch Paint: DllMain"); + NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp index 0fdf6db75..ad5393cf5 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/dllmain.cpp @@ -1,6 +1,7 @@ #include "vertex_tree_paint.h" #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include +#include "nel/misc/sheet_id.h" HINSTANCE hInstance; @@ -12,6 +13,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Vertex Tree Paint: DllMain"); + NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; // Hang on to this DLL's instance handle. diff --git a/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp b/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp index fbd53ca37..eb39f7cb0 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/tile_utility/DllEntry.cpp @@ -21,6 +21,7 @@ #include "../nel_3dsmax_shared/nel_3dsmax_shared.h" #include #include +#include "nel/misc/sheet_id.h" extern ClassDesc2* GetTile_utilityDesc(); extern ClassDesc* GetRGBAddDesc(); @@ -41,6 +42,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { new NLMISC::CLibraryContext(GetSharedNelContext()); nldebug("NeL Tile Utility: DllMain"); + NLMISC::CSheetId::initWithoutSheet(); } hInstance = hinstDLL; // Hang on to this DLL's instance handle. From 6b0d4682408e3f6baac19541c7edfff80332bdde Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 14:39:07 +0200 Subject: [PATCH 11/28] Remove a debug assert --- code/nel/src/3d/program.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/3d/program.cpp b/code/nel/src/3d/program.cpp index facf877fc..390fdf314 100644 --- a/code/nel/src/3d/program.cpp +++ b/code/nel/src/3d/program.cpp @@ -94,7 +94,7 @@ const char *CProgramIndex::Names[NUM_UNIFORMS] = void IProgram::buildInfo(CSource *source) { - nlassert(!m_Source); + // nlassert(!m_Source); // VALID: When deleting driver and creating new one. m_Source = source; From 7d8e803f7a90a5cd1dc31755baf721d1190e03ba Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 15:23:06 +0200 Subject: [PATCH 12/28] Crashfix Physique export --- .../nel_mesh_lib/export_skinning.cpp | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp index f8dce3ac6..29fbfb275 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp @@ -961,40 +961,43 @@ INode* CExportNel::getSkeletonRootBone (INode& node) // Get a vertex interface IPhyVertexExport *vertexInterface=localData->GetVertexInterface (vtx); - // Check if it is a rigid vertex or a blended vertex - int type=vertexInterface->GetVertexType (); - if (type==RIGID_TYPE) + if (vertexInterface) { - // this is a rigid vertex - IPhyRigidVertex *rigidInterface=(IPhyRigidVertex*)vertexInterface; - - // Get the bone - INode *newBone=rigidInterface->GetNode(); - - // Get the root of the hierarchy - ret=getRoot (newBone); - found=true; - break; - } - else - { - // It must be a blendable vertex - nlassert (type==RIGID_BLENDED_TYPE); - IPhyBlendedRigidVertex *blendedInterface=(IPhyBlendedRigidVertex*)vertexInterface; - - // For each bones - uint bone; - uint count=(uint)blendedInterface->GetNumberNodes (); - for (bone=0; boneGetVertexType (); + if (type==RIGID_TYPE) { - // Get the bone pointer - INode *newBone=blendedInterface->GetNode(bone); + // this is a rigid vertex + IPhyRigidVertex *rigidInterface=(IPhyRigidVertex*)vertexInterface; + + // Get the bone + INode *newBone=rigidInterface->GetNode(); // Get the root of the hierarchy ret=getRoot (newBone); found=true; break; } + else + { + // It must be a blendable vertex + nlassert (type==RIGID_BLENDED_TYPE); + IPhyBlendedRigidVertex *blendedInterface=(IPhyBlendedRigidVertex*)vertexInterface; + + // For each bones + uint bone; + uint count=(uint)blendedInterface->GetNumberNodes (); + for (bone=0; boneGetNode(bone); + + // Get the root of the hierarchy + ret=getRoot (newBone); + found=true; + break; + } + } } // Release vertex interfaces From a9e3804011c809f2d105e70a230d9c09a65385d7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 15:23:51 +0200 Subject: [PATCH 13/28] Add warning --- code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp index 29fbfb275..aee5753ec 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp @@ -999,6 +999,10 @@ INode* CExportNel::getSkeletonRootBone (INode& node) } } } + else + { + nlwarning("Physique vertex interface NULL"); + } // Release vertex interfaces localData->ReleaseVertexInterface (vertexInterface); From f49e9c5df1d666ca0a587b854a60877bf838006b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 15:42:11 +0200 Subject: [PATCH 14/28] Fix Skin export interface issue, #169 --- .../nel_mesh_lib/export_skinning.cpp | 77 ++++--------------- 1 file changed, 15 insertions(+), 62 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp index aee5753ec..6ec9dd081 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp @@ -18,64 +18,17 @@ #include "export_nel.h" #include "export_appdata.h" #include "nel/3d/skeleton_shape.h" +#include "iskin.h" using namespace NLMISC; using namespace NL3D; // *************************************************************************** -#define SKIN_INTERFACE 0x00010000 - -// *************************************************************************** - -#define SKIN_CLASS_ID Class_ID(9815843,87654) #define PHYSIQUE_CLASS_ID Class_ID(PHYSIQUE_CLASS_ID_A, PHYSIQUE_CLASS_ID_B) // *************************************************************************** -class ISkinContextData -{ -public: - virtual int GetNumPoints()=0; - virtual int GetNumAssignedBones(int vertexIdx)=0; - virtual int GetAssignedBone(int vertexIdx, int boneIdx)=0; - virtual float GetBoneWeight(int vertexIdx, int boneIdx)=0; - - virtual int GetSubCurveIndex(int vertexIdx, int boneIdx)=0; - virtual int GetSubSegmentIndex(int vertexIdx, int boneIdx)=0; - virtual float GetSubSegmentDistance(int vertexIdx, int boneIdx)=0; - virtual Point3 GetTangent(int vertexIdx, int boneIdx)=0; - virtual Point3 GetOPoint(int vertexIdx, int boneIdx)=0; - - virtual void SetWeight(int vertexIdx, int boneIdx, float weight)=0; - virtual void SetWeight(int vertexIdx, INode* bone, float weight)=0; - virtual void SetWeights(int vertexIdx, Tab boneIdx, Tab weights)=0; - virtual void SetWeights(int vertexIdx, INodeTab boneIdx, Tab weights)=0; - -}; - -// *************************************************************************** - -class ISkin -{ -public: - ISkin() {} - ~ISkin() {} - virtual int GetBoneInitTM(INode *pNode, Matrix3 &InitTM, bool bObjOffset = false)=0; - virtual int GetSkinInitTM(INode *pNode, Matrix3 &InitTM, bool bObjOffset = false)=0; - virtual int GetNumBones()=0; - virtual INode *GetBone(int idx)=0; - virtual DWORD GetBoneProperty(int idx)=0; - virtual ISkinContextData *GetContextInterface(INode *pNode)=0; - - virtual BOOL AddBone(INode *bone)=0; - virtual BOOL AddBones(INodeTab *bones)=0; - virtual BOOL RemoveBone(INode *bone)=0; - virtual void Invalidate()=0; -}; - -// *************************************************************************** - void CExportNel::buildSkeletonShape (CSkeletonShape& skeletonShape, INode& node, mapBoneBindPos* mapBindPos, TInodePtrInt& mapId, TimeValue time) { @@ -422,7 +375,7 @@ bool CExportNel::isSkin (INode& node) bool ok=false; // Get the skin modifier - Modifier* skin=getModifier (&node, SKIN_CLASS_ID); + Modifier* skin=getModifier (&node, SKIN_CLASSID); // Found it ? if (skin) @@ -431,7 +384,7 @@ bool CExportNel::isSkin (INode& node) //if (skin->IsEnabled()) { // Get a com_skin2 interface - ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE); + ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN); // Found com_skin2 ? if (comSkinInterface) @@ -446,7 +399,7 @@ bool CExportNel::isSkin (INode& node) ok=true; // Release the interface - skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface); + skin->ReleaseInterface (I_SKIN, comSkinInterface); } } } @@ -490,7 +443,7 @@ uint CExportNel::buildSkinning (CMesh::CMeshBuild& buildMesh, const TInodePtrInt uint ok=NoError; // Get the skin modifier - Modifier* skin=getModifier (&node, SKIN_CLASS_ID); + Modifier* skin=getModifier (&node, SKIN_CLASSID); // Build a the name array buildMesh.BonesNames.resize (skeletonShape.size()); @@ -513,7 +466,7 @@ uint CExportNel::buildSkinning (CMesh::CMeshBuild& buildMesh, const TInodePtrInt // ********** COMSKIN EXPORT ********** // Get a com_skin2 interface - ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE); + ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN); // Should been controled with isSkin before. nlassert (comSkinInterface); @@ -645,7 +598,7 @@ uint CExportNel::buildSkinning (CMesh::CMeshBuild& buildMesh, const TInodePtrInt } // Release the interface - skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface); + skin->ReleaseInterface (I_SKIN, comSkinInterface); } else { @@ -881,13 +834,13 @@ INode* CExportNel::getSkeletonRootBone (INode& node) INode* ret=NULL; // Get the skin modifier - Modifier* skin=getModifier (&node, SKIN_CLASS_ID); + Modifier* skin=getModifier (&node, SKIN_CLASSID); // Found it ? if (skin) { // Get a com_skin2 interface - ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE); + ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN); // Found com_skin2 ? if (comSkinInterface) @@ -921,7 +874,7 @@ INode* CExportNel::getSkeletonRootBone (INode& node) } // Release the interface - skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface); + skin->ReleaseInterface (I_SKIN, comSkinInterface); } } else @@ -1037,13 +990,13 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind uint ok=NoError; // Get the skin modifier - Modifier* skin=getModifier (&skinedNode, SKIN_CLASS_ID); + Modifier* skin=getModifier (&skinedNode, SKIN_CLASSID); // Found it ? if (skin) { // Get a com_skin2 interface - ISkin *comSkinInterface=(ISkin*)skin->GetInterface (SKIN_INTERFACE); + ISkin *comSkinInterface=(ISkin*)skin->GetInterface (I_SKIN); // Should been controled with isSkin before. nlassert (comSkinInterface); @@ -1089,7 +1042,7 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind } // Release the interface - skin->ReleaseInterface (SKIN_INTERFACE, comSkinInterface); + skin->ReleaseInterface (I_SKIN, comSkinInterface); } } else @@ -1274,7 +1227,7 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind } // Release the interface - skin->ReleaseInterface (SKIN_INTERFACE, physiqueInterface); + skin->ReleaseInterface (I_SKIN, physiqueInterface); } } } @@ -1286,7 +1239,7 @@ void CExportNel::addSkeletonBindPos (INode& skinedNode, mapBoneBindPos& boneBind void CExportNel::enableSkinModifier (INode& node, bool enable) { // Get the skin modifier - Modifier* skin=getModifier (&node, SKIN_CLASS_ID); + Modifier* skin=getModifier (&node, SKIN_CLASSID); // Found it ? if (skin) From 9061eb83897bac1fb028cb40a271f9bc541d61d6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 16:48:14 +0200 Subject: [PATCH 15/28] Cleanup --- code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp | 7 +++---- .../tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) 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 738e6b724..5997006d5 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 @@ -508,14 +508,13 @@ std::string CExportNel::getName (MtlBase& mtl) // -------------------------------------------------- // Get the node name -std::string CExportNel::getName (INode& mtl) +std::string CExportNel::getName(INode& node) { // Return its name - TCHAR* name=mtl.GetName(); - return std::string (name); + MCHAR* name = node.GetName(); + return std::string(name); } - // -------------------------------------------------- // Get the NEL node name diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp index 6ec9dd081..3708a0906 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp @@ -363,7 +363,8 @@ void CExportNel::buildSkeleton (std::vector& bonesArray, INode& node, bonesArray.push_back (bone); // **** Call on child - for (int children=0; children Date: Wed, 30 Jul 2014 20:56:28 +0200 Subject: [PATCH 16/28] Crashfix for 3ds Max export --- code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 508c482f6..d6bdbb690 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 @@ -293,8 +293,11 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime) for (sint i = 0; i < exclusionList.Count(); ++i) { INode *exclNode = exclusionList[i]; - string tmp = exclNode->GetName(); - this->setExclusion.insert(tmp); + if (exclNode) // Crashfix // FIXME: Why is this NULL? + { + string tmp = exclNode->GetName(); + this->setExclusion.insert(tmp); + } } #endif // (MAX_RELEASE < 4000) From e58df5f7e9ef5a5abdc45a4323506d47eb5de596 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 30 Jul 2014 20:56:28 +0200 Subject: [PATCH 17/28] Faster ligo export step --- .../build_gamedata/configuration/scripts.py | 27 +++++++++++++++++-- .../build_gamedata/processes/ligo/1_export.py | 2 +- .../ligo/maxscript/nel_ligo_export.ms | 18 ++++++++----- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/code/nel/tools/build_gamedata/configuration/scripts.py b/code/nel/tools/build_gamedata/configuration/scripts.py index d7122d3a3..6bd4e00dc 100755 --- a/code/nel/tools/build_gamedata/configuration/scripts.py +++ b/code/nel/tools/build_gamedata/configuration/scripts.py @@ -282,6 +282,26 @@ def findFilesNoSubdir(log, dir_where, file_ext): printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull) return result +def findFilesNoSubdirFiltered(log, dir_where, file_ext, filter): + if len(filter) == 0: + return findFilesNoSubdir(log, dir_where, file_ext) + result = [ ] + files = os.listdir(dir_where) + len_file_ext = len(file_ext) + for fileName in files: + if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*": + fileFull = dir_where + "/" + fileName + if os.path.isfile(fileFull): + if fileName[-len_file_ext:].lower() == file_ext.lower(): + fileNameLower = fileName.lower() + for filterWord in filter: + if filterWord in fileNameLower: + result += [ fileName ] + break + elif not os.path.isdir(fileFull): + printLog(log, "findFilesNoSubdir: file not dir or file?!" + fileFull) + return result + def findFile(log, dir_where, file_name): files = os.listdir(dir_where) for fileName in files: @@ -323,11 +343,11 @@ def needUpdateDirByLowercaseTagLog(log, dir_source, ext_source, dir_dest, ext_de printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) return 0 -def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest): +def needUpdateDirByTagLogFiltered(log, dir_source, ext_source, dir_dest, ext_dest, filter): updateCount = 0 skipCount = 0 lenSrcExt = len(ext_source) - sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) + sourceFiles = findFilesNoSubdirFiltered(log, dir_source, ext_source, filter) destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) for file in sourceFiles: sourceFile = dir_source + "/" + file @@ -348,6 +368,9 @@ def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest): printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) return 0 +def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest): + needUpdateDirByTagLogFiltered(log, dir_source, ext_source, dir_dest, ext_dest, [ ]) + def needUpdateDirNoSubdirFile(log, dir_source, file_dest): if not os.path.isfile(file_dest): return 1 diff --git a/code/nel/tools/build_gamedata/processes/ligo/1_export.py b/code/nel/tools/build_gamedata/processes/ligo/1_export.py index 8204926ac..029121478 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ligo/1_export.py @@ -62,7 +62,7 @@ if LigoExportLand == "" or LigoExportOnePass == 1: mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory) mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory) - if (needUpdateDirByTagLog(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory, ".max.tag")): + if (needUpdateDirByTagLogFiltered(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory, ".max.tag", [ "zonematerial", "zonetransition", "zonespecial" ])): printLog(log, "WRITE " + ligoIniPath) ligoIni = open(ligoIniPath, "w") ligoIni.write("[LigoConfig]\n") 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 303b4917f..48a98bd39 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 @@ -508,8 +508,8 @@ try for curFileName in MaxFilesList do ( -- Free memory and file handles - gc () - resetMAXFile #noprompt + -- gc () + -- resetMAXFile #noprompt tokenArray = filterString (getFilenameFile curFileName) "-" @@ -622,6 +622,8 @@ try ) resetMAXFile #noprompt + gc () + resetMAXFile #noprompt ) else ( @@ -635,10 +637,10 @@ try for curFileName in MaxFilesList do ( -- Free memory and file handles - gc () + -- gc () -- Reset 3dsmax - resetMAXFile #noprompt + -- resetMAXFile #noprompt tokenArray = filterString (getFilenameFile curFileName) "-" if (tokenArray.count == 4) and (tokenArray[1] == "zonetransition") then @@ -852,6 +854,8 @@ try ) resetMAXFile #noprompt + gc () + resetMAXFile #noprompt ) else ( @@ -865,8 +869,8 @@ try for curFileName in MaxFilesList do ( -- Free memory and file handles - gc () - resetMAXFile #noprompt + -- gc () + -- resetMAXFile #noprompt tokenArray = filterString (getFilenameFile curFileName) "-" if (tokenArray.count == 2) and (tokenArray[1] == "zonespecial") then @@ -971,6 +975,8 @@ try ) resetMAXFile #noprompt + gc () + resetMAXFile #noprompt ) else ( From 1cf184c09de3ef9cd47e372a4a5fc598101aea6e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 30 Jul 2014 20:56:28 +0200 Subject: [PATCH 18/28] Fix XRef ligo export --- .../ligo/maxscript/nel_ligo_export.ms | 104 +++++++----------- 1 file changed, 37 insertions(+), 67 deletions(-) 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 48a98bd39..4b25c1427 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 @@ -233,6 +233,15 @@ fn exportCollisionsFromZone outputNelDir filename = if (isToBeExportedCollision m) == true then selectmore m ) + for node in objects where classOf node == XRefObject do + ( + sourceObject = node.GetSourceObject false + if (superclassOf sourceObject == GeometryClass) then + ( + if (isToBeExportedCollision node) == true then + selectmore node + ) + ) -- Export the collision if (NelExportCollision ($selection as array) outputNelDir) == false then @@ -311,10 +320,10 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi -- Scan all the ig in this project nlerror("Scan all the ig in this project") - for node in geometry do + for node in objects do ( ig = getIg node - nlerror("geometry node") + nlerror("object node") if ( (ig != undefined) and (ig != "") and ( (igName == "") or (ig == igName) ) ) then ( nlerror("Found something with an IG name") @@ -347,71 +356,6 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi ) ) - for node in lights do - ( - ig = getIg node - - if ( (ig != undefined) and (ig != "") and ( (igName == "") or ( ig == igName) ) ) then - ( - -- Transition ? - if ( ig == IgName) then - ( - -- Transform the object - node.transform = buildTransitionMatrixObj node.transform transitionZone cellSize - ) - - -- Found ? - found = false - - -- Already found ? - for j = 1 to ig_array.count do - ( - if (ig_array[j]==ig) then - ( - found = true - ) - ) - - -- Found ? - if (found == false) then - ( - append ig_array ig - ) - ) - ) - - for node in helpers do - ( - ig = getIg node - if ( (ig != undefined) and (ig != "") and ( (igName == "") or (ig == igName) ) ) then - ( - -- Transition ? - if (ig == IgName) then - ( - -- Transform the object - node.transform = buildTransitionMatrixObj node.transform transitionZone cellSize - ) - - -- Found ? - found = false - -- Already found ? - for j = 1 to ig_array.count do - ( - if (ig_array[j]==ig) then - ( - found = true - ) - ) - -- Found ? - if (found == false) then - ( - append ig_array ig - ) - ) - ) - - - -- Have some ig ? if (ig_array.count != 0) then ( @@ -429,6 +373,29 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi -- Select none max select none + for node in objects where classOf node == XRefObject do + ( + if ((getIg node) == ig_array[ig]) then + ( + sourceObject = node.GetSourceObject false + if (classOf sourceObject == XRefObject) then + ( + nlerror("FAIL XREF STILL XREF " + node.name) + ) + else if (superclassOf sourceObject == GeometryClass) then + ( + selectmore node + ) + else if (superclassOf sourceObject == Helper) then + ( + selectmore node + ) + else if (superclassOf sourceObject == Light) then + ( + selectmore node + ) + ) + ) -- Select all node in this ig for node in geometry do ( @@ -528,6 +495,7 @@ try nlerror ("Scanning file "+curFileName+" ...") mergeMaxFile curFileName quiet:true + objXRefMgr.UpdateAllRecords() -- Unhide category unhidecategory() @@ -674,6 +642,7 @@ try nlerror ("Scanning file "+curFileName+" ...") mergeMaxFile curFileName quiet:true + objXRefMgr.UpdateAllRecords() -- Unhide category unhidecategory() @@ -888,6 +857,7 @@ try nlerror ("Scanning file "+curFileName+" ...") mergeMaxFile curFileName quiet:true + objXRefMgr.UpdateAllRecords() -- Unhide category unhidecategory() From 8d8d3409685faf41e1908d0f1aae63ea9c162640 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 30 Jul 2014 21:47:48 +0200 Subject: [PATCH 19/28] Bugfix --- .../build_gamedata/configuration/scripts.py | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/build_gamedata/configuration/scripts.py b/code/nel/tools/build_gamedata/configuration/scripts.py index 6bd4e00dc..02f13139c 100755 --- a/code/nel/tools/build_gamedata/configuration/scripts.py +++ b/code/nel/tools/build_gamedata/configuration/scripts.py @@ -369,7 +369,29 @@ def needUpdateDirByTagLogFiltered(log, dir_source, ext_source, dir_dest, ext_des return 0 def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest): - needUpdateDirByTagLogFiltered(log, dir_source, ext_source, dir_dest, ext_dest, [ ]) + updateCount = 0 + skipCount = 0 + lenSrcExt = len(ext_source) + sourceFiles = findFilesNoSubdir(log, dir_source, ext_source) + destFiles = findFilesNoSubdir(log, dir_dest, ext_dest) + for file in sourceFiles: + sourceFile = dir_source + "/" + file + tagFile = dir_dest + "/" + file[0:-lenSrcExt] + ext_dest + if os.path.isfile(tagFile): + sourceTime = os.stat(sourceFile).st_mtime + tagTime = os.stat(tagFile).st_mtime + if (sourceTime > tagTime): + updateCount = updateCount + 1 + else: + skipCount = skipCount + 1 + else: + updateCount = updateCount + 1 + if updateCount > 0: + printLog(log, "UPDATE " + str(updateCount) + " / " + str(len(sourceFiles)) + "; SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 1 + else: + printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles))) + return 0 def needUpdateDirNoSubdirFile(log, dir_source, file_dest): if not os.path.isfile(file_dest): From c461502dc7456dec4c282b352dbdd9fba0b6e70c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 31 Jul 2014 19:50:25 +0200 Subject: [PATCH 20/28] Crash workaround in IG loading, ref #171 --- code/nel/src/3d/scene_group.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/nel/src/3d/scene_group.cpp b/code/nel/src/3d/scene_group.cpp index d539278cd..fa67230d4 100644 --- a/code/nel/src/3d/scene_group.cpp +++ b/code/nel/src/3d/scene_group.cpp @@ -753,7 +753,13 @@ bool CInstanceGroup::addToSceneWhenAllShapesLoaded (CScene& scene, IDriver *driv { _Instances[i]->clipUnlinkFromAll(); for (j = 0; j < _InstancesInfos[i].Clusters.size(); ++j) - _ClusterInstances[_InstancesInfos[i].Clusters[j]]->clipAddChild( _Instances[i] ); + { + uint32 clusterInst = _InstancesInfos[i].Clusters[j]; + if (clusterInst < _ClusterInstances.size()) + _ClusterInstances[clusterInst]->clipAddChild( _Instances[i] ); + else + nlwarning("IG: BUG: Cluster infos size %u, indexing %u", (uint32)_ClusterInstances.size(), clusterInst); + } // For the first time we have to set all the instances to NOT move (and not be rebinded) _Instances[i]->freeze(); _Instances[i]->setClusterSystem (this); From 8e7a3b27d77bf25a2cb54655f70644150dc0b8d2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 29 Jul 2014 19:21:25 +0200 Subject: [PATCH 21/28] ryzomcore/v0.9.1 --- code/CMakeLists.txt | 4 ++-- code/nel/tools/3d/plugin_max/nel_export/nel_export.rc | 8 ++++---- .../plugin_max/nel_patch_converter/nel_patch_converter.rc | 8 ++++---- code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc | 8 ++++---- .../3d/plugin_max/nel_patch_paint/nel_patch_paint.rc | 8 ++++---- .../plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc | 8 ++++---- code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc | 8 ++++---- .../webtt/cake/libs/model/datasources/dbo/dbo_sqlite.php | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 3fae8488c..34b33859b 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -2,7 +2,7 @@ # # NeL # Authors: Nevrax and the NeL Community -# Version: 0.9.0 +# Version: 0.9.1 # # Notes: # * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path @@ -48,7 +48,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 0) SET(NL_VERSION_MINOR 9) -SET(NL_VERSION_PATCH 0) +SET(NL_VERSION_PATCH 1) SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") #----------------------------------------------------------------------------- diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc index 0b38b4678..bf3c4a12f 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc @@ -575,8 +575,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 9, 0, 0 - PRODUCTVERSION 0, 9, 0, 0 + FILEVERSION 0, 9, 1, 0 + PRODUCTVERSION 0, 9, 1, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -593,14 +593,14 @@ BEGIN BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileVersion", "0.9.0\0" + VALUE "FileVersion", "0.9.1\0" VALUE "InternalName", "CNelExport\0" VALUE "LegalCopyright", "\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "CNelExport.dlu\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.9.0\0" + VALUE "ProductVersion", "0.9.1\0" VALUE "SpecialBuild", "\0" END END diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc index ab41bf934..d921a6c36 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc @@ -85,8 +85,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 9, 0, 0 - PRODUCTVERSION 0, 9, 0, 0 + FILEVERSION 0, 9, 1, 0 + PRODUCTVERSION 0, 9, 1, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -103,12 +103,12 @@ BEGIN BEGIN VALUE "Comments", "http://www.ryzomcore.org/" VALUE "FileDescription", "PatchMesh to RykolPatchMesh" - VALUE "FileVersion", "0.9.0" + VALUE "FileVersion", "0.9.1" VALUE "InternalName", "PatchMesh to RykolPatchMesh" VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd." VALUE "OriginalFilename", "nel_convert_patch.dlm" VALUE "ProductName", "NeL Patch Converter" - VALUE "ProductVersion", "0.9.0" + VALUE "ProductVersion", "0.9.1" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc index 6b27041de..0acebb752 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc @@ -514,8 +514,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 9, 0, 0 - PRODUCTVERSION 0, 9, 0, 0 + FILEVERSION 0, 9, 1, 0 + PRODUCTVERSION 0, 9, 1, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -533,13 +533,13 @@ BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core" VALUE "FileDescription", "NeL Patch Edit" - VALUE "FileVersion", "0.9.0" + VALUE "FileVersion", "0.9.1" VALUE "InternalName", "neleditpatch" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc." VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF." VALUE "OriginalFilename", "neleditpatch.dlm" VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", "0.9.0" + VALUE "ProductVersion", "0.9.1" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc index cad261814..bdde6c31d 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc @@ -96,8 +96,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 9, 0, 0 - PRODUCTVERSION 0, 9, 0, 0 + FILEVERSION 0, 9, 1, 0 + PRODUCTVERSION 0, 9, 1, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -116,14 +116,14 @@ BEGIN VALUE "Comments", "TECH: cyril.corvazier\0" VALUE "CompanyName", "Ryzom Core\0" VALUE "FileDescription", "NeL Patch Paint\0" - VALUE "FileVersion", "0.9.0\0" + VALUE "FileVersion", "0.9.1\0" VALUE "InternalName", "mods\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nelpatchpaint.dlm\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.9.0\0" + VALUE "ProductVersion", "0.9.1\0" VALUE "SpecialBuild", "\0" END END diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc index b69f43106..bf23b28e6 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc @@ -125,8 +125,8 @@ IDC_DROPPER_CURSOR CURSOR DISCARDABLE "dropcurs.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 9, 0, 0 - PRODUCTVERSION 0, 9, 0, 0 + FILEVERSION 0, 9, 1, 0 + PRODUCTVERSION 0, 9, 1, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -145,13 +145,13 @@ BEGIN VALUE "Comments", "TECH: \0" VALUE "CompanyName", "Ryzom Core\0" VALUE "FileDescription", "Vertex Tree Paint\0" - VALUE "FileVersion", "0.9.0\0" + VALUE "FileVersion", "0.9.1\0" VALUE "InternalName", "VertexTreePaint\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0" VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0" VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.9.0\0" + VALUE "ProductVersion", "0.9.1\0" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc index c3125ebaf..7615f379f 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc @@ -124,8 +124,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 9, 0, 0 - PRODUCTVERSION 0, 9, 0, 0 + FILEVERSION 0, 9, 1, 0 + PRODUCTVERSION 0, 9, 1, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -142,12 +142,12 @@ BEGIN BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileVersion", "0.9.0\0" + VALUE "FileVersion", "0.9.1\0" VALUE "InternalName", "Tile_utility\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Tile_utility.dlu\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.9.0\0" + VALUE "ProductVersion", "0.9.1\0" VALUE "FileDescription", "Create material for tiles\0" VALUE "Comments", "TECH: \0" VALUE "LegalTrademarks", "\0" diff --git a/code/web/public_php/webtt/cake/libs/model/datasources/dbo/dbo_sqlite.php b/code/web/public_php/webtt/cake/libs/model/datasources/dbo/dbo_sqlite.php index efc660f33..fc3bc4abf 100644 --- a/code/web/public_php/webtt/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/code/web/public_php/webtt/cake/libs/model/datasources/dbo/dbo_sqlite.php @@ -14,7 +14,7 @@ * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo - * @since CakePHP(tm) v 0.9.0 + * @since CakePHP(tm) v 0.9.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ From f980ff7bee126cc7ef452f6bf499c44cc01584f0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 31 Jul 2014 19:57:22 +0200 Subject: [PATCH 22/28] Added tag ryzomcore/v0.9.1 for changeset 79776c337176 --- .hgtags | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.hgtags b/.hgtags index cb11e3e8b..106c1e722 100644 --- a/.hgtags +++ b/.hgtags @@ -1,8 +1,4 @@ -a409552f83cb55a5c20f867fd7bcae1d0083d01a ryzomcore_0_8_0 -a409552f83cb55a5c20f867fd7bcae1d0083d01a ryzomcore_0_8_0 -0000000000000000000000000000000000000000 ryzomcore_0_8_0 -0000000000000000000000000000000000000000 ryzomcore_0_8_0 -4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore_0_8_0 - -950d650ca92e6041611258d7e5131ccf661e4ec2 latest-graft-to-default -950d650ca92e6041611258d7e5131ccf661e4ec2 latest-merge-from-default +950d650ca92e6041611258d7e5131ccf661e4ec2 compatibility-merge +4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore/v0.8.0 +00d9b6e29e95f56785fbf85abe60afd34674f402 ryzomcore/v0.9.0 +79776c337176dd5b02e1a74fe5dfb703b91747aa ryzomcore/v0.9.1 From 9aabaebc3819fc80efcf565eb4b920d06d09a3ca Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 1 Aug 2014 17:00:08 +0200 Subject: [PATCH 23/28] Fixed: Compilation of PACS tools without NeL 3D --- code/nel/tools/pacs/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/pacs/CMakeLists.txt b/code/nel/tools/pacs/CMakeLists.txt index 405476ed6..c3a5a71f6 100644 --- a/code/nel/tools/pacs/CMakeLists.txt +++ b/code/nel/tools/pacs/CMakeLists.txt @@ -1 +1,9 @@ -SUBDIRS(build_ig_boxes build_indoor_rbank build_rbank) +IF(WITH_3D) + ADD_SUBDIRECTORY(build_ig_boxes) + + IF(WITH_LIGO) + ADD_SUBDIRECTORY(build_rbank) + ENDIF() +ENDIF() + +ADD_SUBDIRECTORY(build_indoor_rbank) From a29f525c9937125fe8c6281e96312e7e7cbbfdbd Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 1 Aug 2014 17:17:53 +0200 Subject: [PATCH 24/28] Fixed: Some NeL tools in 3d directory don't need NeL 3D --- code/nel/tools/3d/CMakeLists.txt | 66 ++++++++++++++++---------------- code/nel/tools/CMakeLists.txt | 4 +- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/code/nel/tools/3d/CMakeLists.txt b/code/nel/tools/3d/CMakeLists.txt index a07e8c53a..2ac0ac1c5 100644 --- a/code/nel/tools/3d/CMakeLists.txt +++ b/code/nel/tools/3d/CMakeLists.txt @@ -1,40 +1,42 @@ IF(WITH_NEL_TOOLS) - + IF(WITH_3D) + SUBDIRS( + anim_builder + animation_set_builder + build_clod_bank + build_clodtex + build_coarse_mesh + build_far_bank + build_shadow_skin + build_smallbank + cluster_viewer + file_info + ig_add + ig_elevation + ig_info + ig_lighter + lightmap_optimizer + zone_dependencies + zone_ig_lighter + zone_lighter + zone_welder + shapes_exporter + shape2obj + zone_check_bind + zone_dump + zviewer) + ENDIF() + SUBDIRS( - build_coarse_mesh - build_far_bank - build_smallbank - ig_lighter - ig_elevation - lightmap_optimizer - zone_dependencies - zone_ig_lighter - zone_lighter - zone_welder - animation_set_builder - anim_builder - build_clod_bank - build_clodtex build_interface - build_shadow_skin - cluster_viewer - file_info get_neighbors - ig_add - ig_info - shapes_exporter tga_cut - tga_resize - shape2obj - zone_check_bind - zone_dump - zviewer) - -ENDIF(WITH_NEL_TOOLS) + tga_resize) +ENDIF() # For tools selection of only max plugins -IF(WIN32) +IF(WIN32 AND WITH_3D) IF(MFC_FOUND) ADD_SUBDIRECTORY(object_viewer) IF(WITH_NEL_MAXPLUGIN) @@ -44,9 +46,9 @@ IF(WIN32) ENDIF(MAXSDK_FOUND) ENDIF(WITH_NEL_MAXPLUGIN) ENDIF(MFC_FOUND) -ENDIF(WIN32) +ENDIF() -IF(WITH_NEL_TOOLS) +IF(WITH_NEL_TOOLS AND WITH_3D) IF(WIN32) # ADD_SUBDIRECTORY(lightmap_optimizer) IF(MFC_FOUND) @@ -71,5 +73,5 @@ IF(WITH_NEL_TOOLS) #crash_log_analyser #shapes_exporter -ENDIF(WITH_NEL_TOOLS) +ENDIF() diff --git a/code/nel/tools/CMakeLists.txt b/code/nel/tools/CMakeLists.txt index abc5dff02..2c1f641a0 100644 --- a/code/nel/tools/CMakeLists.txt +++ b/code/nel/tools/CMakeLists.txt @@ -6,9 +6,7 @@ IF(WITH_NEL_TOOLS) ENDIF(WITH_NEL_TOOLS) # Max plugins are under the 3d directory as well. -IF(WITH_3D) - ADD_SUBDIRECTORY(3d) -ENDIF(WITH_3D) +ADD_SUBDIRECTORY(3d) # Don't add other subdirectories if only max plugins are selected. IF(WITH_NEL_TOOLS) From ffb7df28fffbbc709b36d7c67b911c70dac687fa Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 2 Aug 2014 10:57:31 +0200 Subject: [PATCH 25/28] Fixed: VC++ 2010 compiler bug in for loop variables reuse --- code/nel/tools/3d/build_interface/main.cpp | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/code/nel/tools/3d/build_interface/main.cpp b/code/nel/tools/3d/build_interface/main.cpp index be39b7d17..da652b0cc 100644 --- a/code/nel/tools/3d/build_interface/main.cpp +++ b/code/nel/tools/3d/build_interface/main.cpp @@ -113,18 +113,17 @@ void putPixel(uint8 *dst, uint8 *src, bool alphaTransfert) // *************************************************************************** bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bool alphaTransfert=true) { - uint32 a, b; - uint8 *rSrcPix = &pSrc->getPixels()[0]; uint8 *rDstPix = &pDst->getPixels()[0]; uint wSrc= pSrc->getWidth(); uint hSrc= pSrc->getHeight(); - for (b = 0; b < hSrc; ++b) - for (a = 0; a < wSrc; ++a) + for (uint b = 0; b < hSrc; ++b) + for (uint a = 0; a < wSrc; ++a) { if (rDstPix[4*((x+a)+(y+b)*pDst->getWidth())+3] != 0) return false; + // write putPixel(rDstPix + 4*((x+a)+(y+b)*pDst->getWidth()), rSrcPix+ 4*(a+b*pSrc->getWidth()), alphaTransfert); } @@ -135,9 +134,9 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bo // expand on W if(wSrcgetWidth()), rDstPix + 4*((x+wSrc-1)+(y+b)*pDst->getWidth()), alphaTransfert); } @@ -146,9 +145,9 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bo // expand on H if(hSrcgetWidth()), rDstPix + 4*((x+a)+(y+hSrc-1)*pDst->getWidth()), alphaTransfert); } @@ -252,12 +251,12 @@ int main(int nNbArg, char **ppArgs) } vector AllMaps; - sint32 i, j; + sint32 j; // Load all maps sint32 mapSize = (sint32)AllMapNames.size(); AllMaps.resize( mapSize ); - for( i = 0; i < mapSize; ++i ) + for(sint i = 0; i < mapSize; ++i ) { try { @@ -275,7 +274,7 @@ int main(int nNbArg, char **ppArgs) } // Sort all maps by decreasing size - for (i = 0; i < mapSize-1; ++i) + for (sint i = 0; i < mapSize-1; ++i) for (j = i+1; j < mapSize; ++j) { NLMISC::CBitmap *pBI = AllMaps[i]; @@ -303,7 +302,7 @@ int main(int nNbArg, char **ppArgs) vector UVMin, UVMax; UVMin.resize (mapSize, NLMISC::CUV(0.0f, 0.0f)); UVMax.resize (mapSize, NLMISC::CUV(0.0f, 0.0f)); - for (i = 0; i < mapSize; ++i) + for (sint i = 0; i < mapSize; ++i) { sint32 x, y; while (!tryAllPos(AllMaps[i], &GlobalMask, x, y)) @@ -349,7 +348,7 @@ int main(int nNbArg, char **ppArgs) } // Convert UV from pixel to ratio - for (i = 0; i < mapSize; ++i) + for (sint i = 0; i < mapSize; ++i) { UVMin[i].U = UVMin[i].U / (float)GlobalTexture.getWidth(); UVMin[i].V = UVMin[i].V / (float)GlobalTexture.getHeight(); @@ -394,7 +393,7 @@ int main(int nNbArg, char **ppArgs) FILE *f = fopen (fmtName.c_str(), "wt"); if (f != NULL) { - for (i = 0; i < mapSize; ++i) + for (sint i = 0; i < mapSize; ++i) { // get the string whitout path string fileName= CFile::getFilename(AllMapNames[i]); @@ -442,6 +441,8 @@ int main(int nNbArg, char **ppArgs) nlwarning("Can't parse %s", bufTmp); continue; } + + sint i; sTGAname = toLower(string(tgaName)); string findTGAName; From b71ec9e7d45d0aaee9233a5f4cb6667f4b7b2fbe Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 2 Aug 2014 10:58:50 +0200 Subject: [PATCH 26/28] Fixed: build_interface currently only works with 32 bits bitmaps --- code/nel/tools/3d/build_interface/main.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/build_interface/main.cpp b/code/nel/tools/3d/build_interface/main.cpp index da652b0cc..343673b34 100644 --- a/code/nel/tools/3d/build_interface/main.cpp +++ b/code/nel/tools/3d/build_interface/main.cpp @@ -258,16 +258,24 @@ int main(int nNbArg, char **ppArgs) AllMaps.resize( mapSize ); for(sint i = 0; i < mapSize; ++i ) { + NLMISC::CBitmap *pBtmp = NULL; + try { - NLMISC::CBitmap *pBtmp = new NLMISC::CBitmap; + pBtmp = new NLMISC::CBitmap; NLMISC::CIFile inFile; - inFile.open( AllMapNames[i] ); - pBtmp->load(inFile); + if (!inFile.open( AllMapNames[i] )) throw NLMISC::Exception("Unable to open " + AllMapNames[i]); + + uint8 colors = pBtmp->load(inFile); + + if (colors != 32) throw NLMISC::Exception(AllMapNames[i] + " is using " + toString(colors) + " bits colors, only 32 bit supported!"); + AllMaps[i] = pBtmp; } catch (const NLMISC::Exception &e) { + if (pBtmp) delete pBtmp; + outString (string("ERROR :") + e.what()); return -1; } From 7aedffce9a1fded8ca22dc070b6a35b68fd3f3eb Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 2 Aug 2014 11:18:24 +0200 Subject: [PATCH 27/28] Changed: #172 XML floating point serialization not using neutral culture (for VC++ 2005 and up) --- code/nel/include/nel/misc/o_xml.h | 3 +++ code/nel/src/misc/o_xml.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/code/nel/include/nel/misc/o_xml.h b/code/nel/include/nel/misc/o_xml.h index 5933b7ebc..a532f0342 100644 --- a/code/nel/include/nel/misc/o_xml.h +++ b/code/nel/include/nel/misc/o_xml.h @@ -178,6 +178,9 @@ private: // Error message std::string _ErrorString; + + // System dependant structure for locale + void* _Locale; }; diff --git a/code/nel/src/misc/o_xml.cpp b/code/nel/src/misc/o_xml.cpp index 005ef8000..0fbe3dade 100644 --- a/code/nel/src/misc/o_xml.cpp +++ b/code/nel/src/misc/o_xml.cpp @@ -23,6 +23,11 @@ // Include from libxml2 #include +#if defined(NL_OS_WINDOWS) && defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 80 +#define USE_LOCALE_SPRINTF +#include +#endif + using namespace std; #ifdef DEBUG_NEW @@ -38,11 +43,22 @@ const char SEPARATOR = ' '; // *************************************************************************** +#ifdef USE_LOCALE_SPRINTF + +#define writenumber(src,format,digits) \ + char number_as_cstring [digits+1]; \ + _sprintf_l( number_as_cstring, format, (_locale_t)_Locale, src ); \ + serialSeparatedBufferOut( number_as_cstring ); + +#else + #define writenumber(src,format,digits) \ char number_as_cstring [digits+1]; \ sprintf( number_as_cstring, format, src ); \ serialSeparatedBufferOut( number_as_cstring ); +#endif + // *************************************************************************** // XML callbacks // *************************************************************************** @@ -133,6 +149,13 @@ COXml::COXml () : IStream (false /* Output mode */) // Push begin _PushBegin = false; + +#ifdef USE_LOCALE_SPRINTF + // create C numeric locale + _Locale = _create_locale(LC_NUMERIC, "C"); +#else + _Locale = NULL; +#endif } // *************************************************************************** @@ -192,6 +215,10 @@ COXml::~COXml () { // Flush document to the internal stream flush (); + +#ifdef USE_LOCALE_SPRINTF + if (_Locale) _free_locale((_locale_t)_Locale); +#endif } // *************************************************************************** From 1c67d6ec0fba1d0ba6275b91e6f19b01a0352b8f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 3 Aug 2014 22:15:12 +0200 Subject: [PATCH 28/28] GL: Occlusion query bugfix --- code/nel/src/3d/driver/opengl/driver_opengl.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index eb59f2205..6dae9f4fe 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -2803,9 +2803,13 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType() else { GLuint result; - nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result); - OcclusionType = result != 0 ? NotOccluded : Occluded; - VisibleCount = (uint) result; + nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT_AVAILABLE, &result); + if (result != GL_FALSE) + { + nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result); + OcclusionType = result != 0 ? NotOccluded : Occluded; + VisibleCount = (uint) result; + } } } #endif