mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-30 07:35:59 +00:00
Fixed: Export crashes caused by incorrect delete of objects created by max.
This commit is contained in:
parent
196dc070e7
commit
9c258ad628
11 changed files with 90 additions and 88 deletions
|
@ -98,7 +98,7 @@ bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( deleteIt )
|
if( deleteIt )
|
||||||
delete maxLight;
|
maxLight->DeleteMe();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime)
|
||||||
this->rSoftShadowConeLength = (float)atof(sTmp.c_str());
|
this->rSoftShadowConeLength = (float)atof(sTmp.c_str());
|
||||||
|
|
||||||
if( deleteIt )
|
if( deleteIt )
|
||||||
delete maxLight;
|
maxLight->DeleteMe();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***********************************************************************************************
|
// ***********************************************************************************************
|
||||||
|
|
|
@ -135,7 +135,7 @@ CCollisionMeshBuild* CExportNel::createCollisionMeshBuild(std::vector<INode *> &
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,7 +237,7 @@ void CExportNel::getLights (std::vector<CLight>& vectLight, TimeValue time, INod
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete maxLight;
|
maxLight->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ bool CExportNel::buildLodCharacter (NL3D::CLodCharacterShapeBuild& lodBuild, IN
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ CMesh::CMeshBuild* CExportNel::createMeshBuild(INode& node, TimeValue tvTime, CM
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ IShape* CExportNel::buildShape (INode& node, TimeValue time, const TInodePtrInt
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1388,7 +1388,7 @@ IMeshGeom *CExportNel::buildMeshGeom (INode& node, TimeValue time, const TInodeP
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2033,7 +2033,7 @@ NL3D::IShape *CExportNel::buildWaterShape(INode& node, TimeValue time)
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
nlinfo("WaterShape : build succesful");
|
nlinfo("WaterShape : build succesful");
|
||||||
return ws;
|
return ws;
|
||||||
}
|
}
|
||||||
|
@ -2074,7 +2074,7 @@ bool CExportNel::buildMeshAABBox(INode &node, NLMISC::CAABBox &dest, TimeValue t
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
{
|
{
|
||||||
#ifndef NL_DEBUG
|
#ifndef NL_DEBUG
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
#endif // NL_DEBUG
|
#endif // NL_DEBUG
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -178,7 +178,7 @@ bool CMeshInterface::buildFromMaxMesh(INode &node, TimeValue tvTime)
|
||||||
//
|
//
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
{
|
{
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ static void AddNodeToQuadGrid(const NLMISC::CAABBox &delimiter, TNodeFaceQG &des
|
||||||
//
|
//
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
{
|
{
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ static bool SelectVerticesInMeshFromInterfaces(const std::vector<CMeshInterface>
|
||||||
if (obj != tri)
|
if (obj != tri)
|
||||||
{
|
{
|
||||||
// not a mesh object, so do nothing
|
// not a mesh object, so do nothing
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1257,7 +1257,7 @@ void CExportNel::buildCamera(NL3D::CCameraInfo &cameraInfo, INode& node, TimeVal
|
||||||
cameraInfo.Fov = genCamera->GetFOV(time);
|
cameraInfo.Fov = genCamera->GetFOV(time);
|
||||||
|
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete genCamera;
|
genCamera->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -597,6 +597,7 @@ CInstanceGroup* CExportNel::buildInstanceGroup(const vector<INode*>& vectNode, v
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// What???
|
// What???
|
||||||
|
nlerror("sLightBuild.Type == %i", (uint32)(sLightBuild.Type));
|
||||||
nlstop;
|
nlstop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1423,7 +1423,7 @@ bool CExportNel::mirrorPhysiqueSelection(INode &node, TimeValue tvTime, const st
|
||||||
|
|
||||||
// Delete the triObject if we should...
|
// Delete the triObject if we should...
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
|
|
||||||
// ok!
|
// ok!
|
||||||
ok= true;
|
ok= true;
|
||||||
|
|
|
@ -151,7 +151,7 @@ bool CExportNel::buildVegetableShape (NL3D::CVegetableShape& skeletonShape, INo
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deleteIt)
|
if (deleteIt)
|
||||||
delete tri;
|
tri->DeleteMe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9,00"
|
||||||
Name="nel_mesh_lib"
|
Name="nel_mesh_lib"
|
||||||
ProjectGUID="{76F225A9-306F-4B99-9606-6B98B680F5FB}"
|
ProjectGUID="{76F225A9-306F-4B99-9606-6B98B680F5FB}"
|
||||||
RootNamespace="nel_mesh_lib"
|
RootNamespace="nel_mesh_lib"
|
||||||
|
@ -87,75 +87,6 @@
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
|
|
||||||
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
|
|
||||||
ConfigurationType="4"
|
|
||||||
CharacterSet="2"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="4"
|
|
||||||
InlineFunctionExpansion="2"
|
|
||||||
EnableIntrinsicFunctions="true"
|
|
||||||
FavorSizeOrSpeed="1"
|
|
||||||
OmitFramePointers="true"
|
|
||||||
EnableFiberSafeOptimizations="true"
|
|
||||||
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_LIB"
|
|
||||||
StringPooling="true"
|
|
||||||
ExceptionHandling="2"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
DisableLanguageExtensions="false"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="true"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLibrarianTool"
|
|
||||||
OutputFile="$(RootNamespace)_r.lib"
|
|
||||||
SuppressStartupBanner="true"
|
|
||||||
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCALinkTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXDCMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCBscMakeTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCFxCopTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
|
@ -226,6 +157,76 @@
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
|
||||||
|
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
EnableFiberSafeOptimizations="true"
|
||||||
|
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_LIB"
|
||||||
|
StringPooling="true"
|
||||||
|
ExceptionHandling="2"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
DisableLanguageExtensions="false"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile="$(RootNamespace)_r.lib"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
|
@ -416,7 +417,7 @@
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32"
|
Name="Debug|x64"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
@ -424,7 +425,7 @@
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Debug|x64"
|
Name="Release|Win32"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
|
Loading…
Reference in a new issue