From 34e941e48dff0720c4a0b777eef6d7fdd986f91c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 9 Feb 2014 22:21:30 +0100 Subject: [PATCH] Cleanup --- .../tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp | 4 ++-- .../plugin_max/nel_mesh_lib/export_collision.cpp | 2 +- .../3d/plugin_max/nel_mesh_lib/export_light.cpp | 2 +- .../nel_mesh_lib/export_lod_character.cpp | 2 +- .../3d/plugin_max/nel_mesh_lib/export_mesh.cpp | 15 ++++++--------- .../nel_mesh_lib/export_mesh_interface.cpp | 6 +++--- .../3d/plugin_max/nel_mesh_lib/export_misc.cpp | 2 +- .../plugin_max/nel_mesh_lib/export_skinning.cpp | 2 +- .../plugin_max/nel_mesh_lib/export_vegetable.cpp | 2 +- 9 files changed, 17 insertions(+), 20 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 27ba7b796..155bbe5b5 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 @@ -99,7 +99,7 @@ bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime) return false; if( deleteIt ) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); return true; } @@ -305,7 +305,7 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime) this->rSoftShadowConeLength = (float)atof(sTmp.c_str()); if( deleteIt ) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); } // *********************************************************************************************** diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp index ecc9e8127..0a01a9fb8 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp @@ -135,7 +135,7 @@ CCollisionMeshBuild* CExportNel::createCollisionMeshBuild(std::vector & // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp index f1cfaa85d..3a497419b 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp @@ -238,7 +238,7 @@ void CExportNel::getLights (std::vector& vectLight, TimeValue time, INod // Delete the GenLight if we should... if (deleteIt) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp index 2d45e14ef..7feca2009 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp @@ -179,7 +179,7 @@ bool CExportNel::buildLodCharacter (NL3D::CLodCharacterShapeBuild& lodBuild, IN // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp index afde40770..bd48be1ea 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp @@ -110,7 +110,7 @@ CMesh::CMeshBuild* CExportNel::createMeshBuild(INode& node, TimeValue tvTime, CM // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -449,7 +449,7 @@ NL3D::IShape *CExportNel::buildShape (INode& node, TimeValue time, const TInodeP // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -1406,7 +1406,7 @@ IMeshGeom *CExportNel::buildMeshGeom (INode& node, TimeValue time, const TInodeP // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -2058,7 +2058,7 @@ NL3D::IShape *CExportNel::buildWaterShape(INode& node, TimeValue time) // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; nlinfo("WaterShape : build succesful"); return ws; @@ -2100,11 +2100,8 @@ bool CExportNel::buildMeshAABBox(INode &node, NLMISC::CAABBox &dest, TimeValue t dest.setMinMax(nelMin, nelMax); // if (deleteIt) - { -#ifdef NL_DONT_FIND_MAX_CRASH - tri->MaybeAutoDelete(); -#endif // NL_DEBUG - } + tri->DeleteThis(); + tri = NULL; return true; } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp index fdcfea8da..899c28a28 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp @@ -180,7 +180,7 @@ bool CMeshInterface::buildFromMaxMesh(INode &node, TimeValue tvTime) } // if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; return true; } @@ -362,7 +362,7 @@ static void AddNodeToQuadGrid(const NLMISC::CAABBox &delimiter, TNodeFaceQG &des nldebug("%d faces where added", numFaceAdded); // if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -495,7 +495,7 @@ static bool SelectVerticesInMeshFromInterfaces(const std::vector if (obj != tri) { // not a mesh object, so do nothing - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; return false; } 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 39e13d868..d967380d0 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 @@ -1272,7 +1272,7 @@ void CExportNel::buildCamera(NL3D::CCameraInfo &cameraInfo, INode& node, TimeVal cameraInfo.Fov = genCamera->GetFOV(time); if (deleteIt) - genCamera->MaybeAutoDelete(); + genCamera->DeleteThis(); genCamera = NULL; } } 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 41741f86d..f8dce3ac6 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 @@ -1446,7 +1446,7 @@ bool CExportNel::mirrorPhysiqueSelection(INode &node, TimeValue tvTime, const st // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; // ok! diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp index af6cbcdac..a39388786 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp @@ -154,7 +154,7 @@ bool CExportNel::buildVegetableShape (NL3D::CVegetableShape& skeletonShape, INo } if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } }