From 3acafbcbb8f031d58bab40b4fadfe788dba144f1 Mon Sep 17 00:00:00 2001
From: Tazpn <tazpn@users.sourceforge.net>
Date: Sun, 1 Oct 2006 21:59:14 +0000
Subject: [PATCH] 0.2.7 ----- o All - Add options to disable certain parts of
 plug via INI o Added so people who only want importer can disable exporter. -
 Enhancements from NifLib including support for Freedom Force - Max 5 build is
 available but untested.

o Exporter
- Fix bug with NiTriShape export which created corrupted files.
- Add option to Update Tangent Space (for Oblivion)
- Add option to Collapse Transforms on meshes (mostly a debug aide)
---
 MaxNifPlugins_Readme.txt        | 20 ++++++++++++--------
 NifCommon/AnimKey.h             |  2 +-
 NifExport/Animation.cpp         | 11 ++++++++++-
 NifExport/Mesh.cpp              | 15 ++++++++++++---
 NifExport/NifExport.rc          | 31 ++++++++++++++++---------------
 NifImport/ImportAnimation.cpp   | 16 +++++++++++++---
 NifImport/ImportCollision.cpp   |  2 ++
 NifImport/ImportMeshAndSkin.cpp | 10 +++++++++-
 NifImport/MaxNifImport.cpp      |  2 +-
 NifPlugins/DllEntry.cpp         |  2 +-
 NifPlugins_VC80.sln             |  9 +++++++--
 11 files changed, 84 insertions(+), 36 deletions(-)

diff --git a/MaxNifPlugins_Readme.txt b/MaxNifPlugins_Readme.txt
index 6df6d5b..aa672eb 100644
--- a/MaxNifPlugins_Readme.txt
+++ b/MaxNifPlugins_Readme.txt
@@ -32,14 +32,18 @@
 
     Change log
     ----------
-      0.2.7
-      -----
-    o All
-      - Add options to disable certain parts of plug via INI
-        o Added so people who only want importer can disable exporter.
-    
-    o Exporter
-      - Fix bug with NiTriShape export which created corrupted files.
+0.2.7
+-----
+o All
+- Add options to disable certain parts of plug via INI
+o Added so people who only want importer can disable exporter.
+- Enhancements from NifLib including support for Freedom Force
+- Max 5 build is available but untested.
+
+o Exporter
+- Fix bug with NiTriShape export which created corrupted files.
+- Add option to Update Tangent Space (for Oblivion)
+- Add option to Collapse Transforms on meshes (mostly a debug aide)
       
         
       0.2.6
diff --git a/NifCommon/AnimKey.h b/NifCommon/AnimKey.h
index 1b1b148..593717f 100644
--- a/NifCommon/AnimKey.h
+++ b/NifCommon/AnimKey.h
@@ -19,7 +19,7 @@ HISTORY:
 #include <Key.h>
 using namespace Niflib;
 
-#if VERSION_3DSMAX <= ((5000<<16)+(15<<8)+0) // Version 7
+#if VERSION_3DSMAX <= ((5000<<16)+(15<<8)+0) // Version 5
 class AnyKey
 {
 public:
diff --git a/NifExport/Animation.cpp b/NifExport/Animation.cpp
index 865f94c..c8c5c94 100644
--- a/NifExport/Animation.cpp
+++ b/NifExport/Animation.cpp
@@ -11,7 +11,9 @@ HISTORY:
 *>	Copyright (c) 2006, All Rights Reserved.
 **********************************************************************/
 #include "pch.h"
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
 #include <IFrameTagManager.h>
+#endif
 #include <notetrck.h>
 #include <set>
 #include "NifExport.h"
@@ -69,6 +71,7 @@ bool GetTextKeys(INode *node, vector<StringKey>& textKeys, Interval range)
 {
    // Populate Text keys and Sequence information from note tracks
    if (Exporter::mUseTimeTags) {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
       if (IFrameTagManager *tagMgr = (IFrameTagManager*)GetCOREInterface(FRAMETAGMANAGER_INTERFACE)) {
          int n = tagMgr->GetTagCount();
          for (int i = 0; i<n; i++) {
@@ -82,6 +85,7 @@ bool GetTextKeys(INode *node, vector<StringKey>& textKeys, Interval range)
             textKeys.push_back(strkey);
          }
       }
+#endif
    } else {
       for (int i=0, n=node->NumNoteTracks(); i<n; ++i) {
          if ( NoteTrack *nt = node->GetNoteTrack(i) ) {
@@ -229,10 +233,12 @@ static bool HasKeys(Control *c)
          if (ikeys->GetNumKeys() > 0)
             return true;
       }
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
       if (Control *sc = c->GetWController()) { 
          if (sc != c && HasKeys(sc)) 
             return true;
       }
+#endif
       if (Control *sc = c->GetXController()) { 
          if (sc != c && HasKeys(sc)) 
             return true;
@@ -313,6 +319,7 @@ bool AnimationExport::doExport(NiControllerSequenceRef seq)
 
    // Populate Text keys and Sequence information from note tracks
    if (Exporter::mUseTimeTags) {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
       if (IFrameTagManager *tagMgr = (IFrameTagManager*)GetCOREInterface(FRAMETAGMANAGER_INTERFACE)) {
          int n = tagMgr->GetTagCount();
          for (int i = 0; i<n; i++) {
@@ -326,6 +333,7 @@ bool AnimationExport::doExport(NiControllerSequenceRef seq)
             textKeys.push_back(strkey);
          }
       }
+#endif
    } else {
       for (int i=0, n=node->NumNoteTracks(); i<n; ++i) {
          if ( NoteTrack *nt = node->GetNoteTrack(i) ) {
@@ -385,6 +393,7 @@ bool AnimationExport::doExport(NiControllerManagerRef mgr, INode *node)
 
    // Populate Text keys and Sequence information from note tracks
    if (Exporter::mUseTimeTags) {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
       if (IFrameTagManager *tagMgr = (IFrameTagManager*)GetCOREInterface(FRAMETAGMANAGER_INTERFACE)) {
 
          curSeq = new NiControllerSequence();
@@ -422,7 +431,7 @@ bool AnimationExport::doExport(NiControllerManagerRef mgr, INode *node)
          this->ranges[curSeq] = range;
          curSeq = NULL;
       }
-
+#endif
    } else {
 
       int nTracks = node->NumNoteTracks();
diff --git a/NifExport/Mesh.cpp b/NifExport/Mesh.cpp
index 3ee02bb..9faaab5 100755
--- a/NifExport/Mesh.cpp
+++ b/NifExport/Mesh.cpp
@@ -1,7 +1,9 @@
 #include "pch.h"
 #include "niutils.h"
 #include "iskin.h"
-#include "MeshNormalSpec.h"
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
+#  include "MeshNormalSpec.h"
+#endif
 #ifdef USE_BIPED
 #  include <cs/BipedApi.h>
 #endif
@@ -65,6 +67,9 @@ Exporter::Result Exporter::exportMesh(NiNodeRef &ninode, INode *node, TimeValue
       if (!hasvc) vertColors.clear();
    }
    
+#if VERSION_3DSMAX <= ((5000<<16)+(15<<8)+0) // Version 5
+   mesh->checkNormals(TRUE);
+#else
    MeshNormalSpec *specNorms = mesh->GetSpecifiedNormals ();
    if (NULL != specNorms) {
       specNorms->CheckNormals();
@@ -73,6 +78,7 @@ Exporter::Result Exporter::exportMesh(NiNodeRef &ninode, INode *node, TimeValue
    } else {
       mesh->checkNormals(TRUE);
    }
+#endif
 
 	Result result = Ok;
 	while (1)
@@ -114,7 +120,7 @@ Exporter::Result Exporter::exportMesh(NiNodeRef &ninode, INode *node, TimeValue
          shape->SetLocalTransform(tm);
 
          if (Exporter::mCollapseTransforms) {
-            CollapseGeomTransform(shape);
+            shape->ApplyTransforms();
          }
          
          makeSkin(shape, node, grp->second, t);
@@ -176,12 +182,15 @@ int Exporter::addVertex(FaceGroup &grp, int face, int vi, Mesh *mesh, const Matr
 	Point3 pt = mesh->verts[ vidx ];
    Point3 norm;
 
+#if VERSION_3DSMAX <= ((5000<<16)+(15<<8)+0) // Version 5
+   norm = getVertexNormal(mesh, face, mesh->getRVertPtr(vidx));
+#else
    MeshNormalSpec *specNorms = mesh->GetSpecifiedNormals ();
    if (NULL != specNorms && specNorms->GetNumNormals() != 0)
       norm = specNorms->GetNormal(face, vi);
    else
       norm = getVertexNormal(mesh, face, mesh->getRVertPtr(vidx));
-
+#endif
 	Point3 uv;
    if (mesh->tVerts && mesh->tvFace) {
 		uv = mesh->tVerts[ mesh->tvFace[ face ].t[ vi ]] * texm;
diff --git a/NifExport/NifExport.rc b/NifExport/NifExport.rc
index 7e38639..426da24 100755
--- a/NifExport/NifExport.rc
+++ b/NifExport/NifExport.rc
@@ -107,7 +107,7 @@ BEGIN
     CONTROL         "http://www.niftools.org",IDC_LBL_LINK,"Button",BS_OWNERDRAW | WS_TABSTOP,103,109,95,14
 END
 
-IDD_NIF_PANEL DIALOGEX 0, 0, 229, 302
+IDD_NIF_PANEL DIALOGEX 0, 0, 229, 287
 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
 EXSTYLE WS_EX_TOOLWINDOW
 CAPTION "Export Nif"
@@ -134,9 +134,9 @@ BEGIN
     CONTROL         "Generate &Strips",IDC_CHK_STRIPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,134,82,10
     CONTROL         "Extra Nodes on Mesh",IDC_CHK_EXTRA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,145,82,11
     CONTROL         "Flatten Hierarchy",IDC_CHK_HIER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,158,82,10
-    CONTROL         "Remove Extra Bones",IDC_CHK_REM_BONES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,169,82,10
-    CONTROL         "&Vertex Colors",IDC_CHK_VCOLORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,181,67,10
-    CONTROL         "Update Tangent Space",IDC_CHK_TANGENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,192,101,10
+    CONTROL         "&Vertex Colors",IDC_CHK_VCOLORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,170,67,10
+    CONTROL         "Update Tangent Space",IDC_CHK_TANGENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,181,101,10
+    CONTROL         "Collapse Transforms",IDC_CHK_COLLAPSE_TRANS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,192,98,9
     GROUPBOX        "Skin Modifier",IDC_STATIC,116,123,108,81
     CONTROL         "Export Skin Modifier",IDC_CHK_SKIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,119,134,93,10
     CONTROL         "Enable Multiple Partitions",IDC_CHK_SKINPART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,119,147,93,10
@@ -144,23 +144,24 @@ BEGIN
     EDITTEXT        IDC_ED_BONES_PART,195,158,24,12,ES_AUTOHSCROLL
     LTEXT           "Bones Per Vertex:",IDC_LBL_BONES_VERTEX,120,174,63,8
     EDITTEXT        IDC_ED_BONES_VERTEX,195,173,24,12,ES_AUTOHSCROLL
-    GROUPBOX        "Animation",IDC_GRP_ANIMATION,4,205,108,68
+    CONTROL         "Remove Extra Bones",IDC_CHK_REM_BONES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,119,187,82,10
+    GROUPBOX        "Animation",IDC_GRP_ANIMATION,4,205,108,56
     COMBOBOX        IDC_CBO_ANIM_TYPE,7,216,85,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     CONTROL         "Transforms",IDC_CHK_TRANSFORMS2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,232,67,10
     LTEXT           "Priority:",IDC_LBL_PRIORITY2,9,245,23,8
     EDITTEXT        IDC_ED_PRIORITY2,37,244,55,12,ES_AUTOHSCROLL
-    GROUPBOX        "Miscellaneous:",IDC_STATIC,115,205,109,68
+    GROUPBOX        "Miscellaneous:",IDC_STATIC,115,205,109,56
     CONTROL         "Add User Prop Buffer",IDC_CHK_UPB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,218,82,11
-    CONTROL         "Sort Nodes",IDC_CHK_SORTNODES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,231,82,10
-    CONTROL         "Add Accum Nodes",IDC_CHK_ALLOW_ACCUM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,244,82,10
-    LTEXT           "Auto-&Weld",IDC_LBL_WELDTHRESH,125,258,47,8,NOT WS_VISIBLE | WS_DISABLED
-    EDITTEXT        IDC_ED_WELDTHRESH,179,256,43,12,ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED
-    DEFPUSHBUTTON   "&Export",IDOK,5,281,34,14
-    PUSHBUTTON      "&Cancel",IDCANCEL,45,281,33,14
+    CONTROL         "Sort Nodes",IDC_CHK_SORTNODES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,230,82,10
+    CONTROL         "Add Accum Nodes",IDC_CHK_ALLOW_ACCUM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,242,82,10
+    LTEXT           "Auto-&Weld",IDC_LBL_WELDTHRESH,125,255,47,8,NOT WS_VISIBLE | WS_DISABLED
+    EDITTEXT        IDC_ED_WELDTHRESH,179,252,43,12,ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED
+    DEFPUSHBUTTON   "&Export",IDOK,5,266,34,14
+    PUSHBUTTON      "&Cancel",IDCANCEL,45,266,33,14
     CONTROL         "Gen. Bone Collision",IDC_CHK_BONE_COLL,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,151,7,73,10
     CONTROL         "&Remap Indices",IDC_CHK_REMAP,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,152,7,72,10
-    LTEXT           "www.niftools.org",IDC_LBL_LINK,137,281,60,14,SS_NOTIFY | SS_CENTERIMAGE
-    LTEXT           "Wiki",IDC_LBL_WIKI,203,281,22,14,SS_NOTIFY | SS_CENTERIMAGE
+    LTEXT           "www.niftools.org",IDC_LBL_LINK,137,266,60,14,SS_NOTIFY | SS_CENTERIMAGE
+    LTEXT           "Wiki",IDC_LBL_WIKI,203,266,22,14,SS_NOTIFY | SS_CENTERIMAGE
 END
 
 
@@ -185,7 +186,7 @@ BEGIN
         LEFTMARGIN, 4
         RIGHTMARGIN, 224
         TOPMARGIN, 7
-        BOTTOMMARGIN, 295
+        BOTTOMMARGIN, 280
     END
 END
 #endif    // APSTUDIO_INVOKED
diff --git a/NifImport/ImportAnimation.cpp b/NifImport/ImportAnimation.cpp
index e86545c..816c04d 100644
--- a/NifImport/ImportAnimation.cpp
+++ b/NifImport/ImportAnimation.cpp
@@ -11,7 +11,9 @@ HISTORY:
 *>	Copyright (c) 2006, All Rights Reserved.
 **********************************************************************/
 #include "stdafx.h"
-#include <IFrameTagManager.h>
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 6+
+#  include <IFrameTagManager.h>
+#endif
 #include <notetrck.h>
 #include "MaxNifImport.h"
 #include "NIFImporter.h"
@@ -39,12 +41,13 @@ enum {
    IPOS_W_REF	=	3,
 };
 
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 6+
 void* operator new(size_t size, NoteKey* stub )
 { return MAX_new(size); }
 
 void operator delete(void* memblock, NoteKey* stub )
 { return MAX_delete(memblock); }
-
+#endif
 
 struct AnimationImport
 {
@@ -109,9 +112,11 @@ static void ClearAnimation(Control *c)
       if (IKeyControl *ikeys = GetKeyControlInterface(c)){
          ikeys->SetNumKeys(0);
       }
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
       if (Control *sc = c->GetWController()) { 
          if (sc != c) ClearAnimation(sc); 
       }
+#endif
       if (Control *sc = c->GetXController()) { 
          if (sc != c) ClearAnimation(sc); 
       }
@@ -157,6 +162,7 @@ void NifImporter::ClearAnimation()
 {
    if (clearAnimation)
    {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
       if (IFrameTagManager *tagMgr = (IFrameTagManager*)GetCOREInterface(FRAMETAGMANAGER_INTERFACE)) {
 
          int n = tagMgr->GetTagCount();
@@ -164,10 +170,11 @@ void NifImporter::ClearAnimation()
             tagMgr->DeleteTag( tagMgr->GetTagID(i) );
          }
       }
+#endif
       ClearAnimation(gi->GetRootNode());
    }
 }
-
+#if 0
 FPValue GetScriptedProperty( FPValue& thing, TCHAR* propName ) {
    init_thread_locals();
    push_alloc_frame();
@@ -285,6 +292,7 @@ static FPValue myAddNewNoteKey(Value* noteTrack, int frame)
 
    return retVal;
 }
+#endif
 
 bool NifImporter::AddNoteTracks(float time, string name, string target, NiTextKeyExtraDataRef textKeyData, bool loop)
 {
@@ -406,11 +414,13 @@ bool NifImporter::AddNoteTracks(float time, string name, string target, NiTextKe
       }
 
       if (addTimeTags) {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
          if (IFrameTagManager *tagMgr = (IFrameTagManager*)GetCOREInterface(FRAMETAGMANAGER_INTERFACE)) {
             for (vector<StringKey>::iterator itr=textKeys.begin(); itr != textKeys.end(); ++itr) {
                tagMgr->CreateNewTag(const_cast<TCHAR*>((*itr).data.c_str()), TimeToFrame(time + (*itr).time), 0, FALSE);
             }
          }
+#endif
       }
       return true;
    }
diff --git a/NifImport/ImportCollision.cpp b/NifImport/ImportCollision.cpp
index 7d4b307..53d6aed 100644
--- a/NifImport/ImportCollision.cpp
+++ b/NifImport/ImportCollision.cpp
@@ -157,8 +157,10 @@ INode* CollisionImport::ImportSphere(bhkRigidBodyRef body, bhkSphereShapeRef sha
       setMAXScriptValue(t, "radius", 0, radius);
 
       if (INode *n = ni.gi->CreateObjectNode(ob)) {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
          // Need to "Affect Pivot Only" and "Center to Object" first
          n->CenterPivot(0, FALSE);
+#endif
          return n;
       }
    }
diff --git a/NifImport/ImportMeshAndSkin.cpp b/NifImport/ImportMeshAndSkin.cpp
index b759cb7..66b7c60 100644
--- a/NifImport/ImportMeshAndSkin.cpp
+++ b/NifImport/ImportMeshAndSkin.cpp
@@ -13,7 +13,9 @@ HISTORY:
 #include "stdafx.h"
 #include "MaxNifImport.h"
 #include "istdplug.h"
-#include "MeshNormalSpec.h"
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
+#  include "MeshNormalSpec.h"
+#endif
 
 using namespace Niflib;
 
@@ -106,6 +108,7 @@ bool NifImporter::ImportMesh(ImpNode *node, TriObject *o, NiTriBasedGeomRef triG
          }
          if (needNormals)
          {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
             mesh.SpecifyNormals();
             MeshNormalSpec *specNorms = mesh.GetSpecifiedNormals ();
             if (NULL != specNorms)
@@ -129,6 +132,7 @@ bool NifImporter::ImportMesh(ImpNode *node, TriObject *o, NiTriBasedGeomRef triG
                specNorms->SetAllExplicit(true);
                specNorms->CheckNormals();
             }
+#endif
          }
       }
    }
@@ -296,6 +300,7 @@ bool NifImporter::ImportVertexColor(ImpNode *node, TriObject *o, Niflib::NiTriBa
    }
    else if (vertexColorMode == 2)
    {
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 5
       vector<Color4> cv = triGeomData->GetColors();
       int n = cv.size();
       if (n > 0)
@@ -371,6 +376,7 @@ bool NifImporter::ImportVertexColor(ImpNode *node, TriObject *o, Niflib::NiTriBa
             //mod->EnableModInViews();
          }
       }
+#endif
    }
    return (hasAlpha || hasColor);
 }
@@ -417,8 +423,10 @@ bool NifImporter::ImportSkin(ImpNode *node, NiTriBasedGeomRef triGeom)
       params->SetValue(0x7/*bone_Limit*/, 0, numWeightsPerVertex);
 
       // Can get some truly bizarre animations without this in MAX with Civ4 Leaderheads
+#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 6+
       BOOL ignore = TRUE;
       params->SetValue(0xE/*ignoreBoneScale*/, 0, ignore);
+#endif
 
       //RefTargetHandle advanced = skinMod->GetReference(3);
       //setMAXScriptValue(advanced, "bone_Limit", 0, numWeightsPerVertex);
diff --git a/NifImport/MaxNifImport.cpp b/NifImport/MaxNifImport.cpp
index 797ffe5..0b77b18 100644
--- a/NifImport/MaxNifImport.cpp
+++ b/NifImport/MaxNifImport.cpp
@@ -96,7 +96,7 @@ MaxNifImport::~MaxNifImport()
 
 int MaxNifImport::ExtCount()
 {
-	return 3;
+	return 2;
 }
 
 const TCHAR *MaxNifImport::Ext(int n)
diff --git a/NifPlugins/DllEntry.cpp b/NifPlugins/DllEntry.cpp
index ce77cbe..fea12c6 100644
--- a/NifPlugins/DllEntry.cpp
+++ b/NifPlugins/DllEntry.cpp
@@ -70,7 +70,7 @@ void InitializeLibSettings()
    } else {
       GetModuleFileName(NULL, iniName, _countof(iniName));
       if (LPTSTR fname = PathFindFileName(iniName))
-         fname = NULL;
+         *fname = 0;
       PathAddBackslash(iniName);
       PathAppend(iniName, "plugcfg");
       PathAppend(iniName, "MaxNifTools.ini");
diff --git a/NifPlugins_VC80.sln b/NifPlugins_VC80.sln
index e9cb84f..c33e8bd 100644
--- a/NifPlugins_VC80.sln
+++ b/NifPlugins_VC80.sln
@@ -21,6 +21,7 @@ Global
 		Debug - Max 6|Win32 = Debug - Max 6|Win32
 		Debug - Max 7|Win32 = Debug - Max 7|Win32
 		Debug - Max 8|Win32 = Debug - Max 8|Win32
+		Release - Max 5|Win32 = Release - Max 5|Win32
 		Release - Max 6|Win32 = Release - Max 6|Win32
 		Release - Max 7|Win32 = Release - Max 7|Win32
 		Release - Max 8|Win32 = Release - Max 8|Win32
@@ -34,20 +35,24 @@ Global
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 7|Win32.Build.0 = Debug - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 8|Win32.ActiveCfg = Debug - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 8|Win32.Build.0 = Debug - PCH|Win32
+		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 5|Win32.ActiveCfg = Release - PCH|Win32
+		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 5|Win32.Build.0 = Release - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 6|Win32.ActiveCfg = Release - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 6|Win32.Build.0 = Release - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 7|Win32.ActiveCfg = Release - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 7|Win32.Build.0 = Release - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 8|Win32.ActiveCfg = Release - PCH|Win32
 		{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 8|Win32.Build.0 = Release - PCH|Win32
-		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 5|Win32.ActiveCfg = Debug - Max 8|Win32
-		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 5|Win32.Build.0 = Debug - Max 8|Win32
+		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 5|Win32.ActiveCfg = Debug - Max 5|Win32
+		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 5|Win32.Build.0 = Debug - Max 5|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 6|Win32.ActiveCfg = Debug - Max 6|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 6|Win32.Build.0 = Debug - Max 6|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 7|Win32.ActiveCfg = Debug - Max 7|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 7|Win32.Build.0 = Debug - Max 7|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 8|Win32.ActiveCfg = Debug - Max 8|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Debug - Max 8|Win32.Build.0 = Debug - Max 8|Win32
+		{466F2D3E-2663-4583-A05C-128683677617}.Release - Max 5|Win32.ActiveCfg = Release - Max 5|Win32
+		{466F2D3E-2663-4583-A05C-128683677617}.Release - Max 5|Win32.Build.0 = Release - Max 5|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Release - Max 6|Win32.ActiveCfg = Release - Max 6|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Release - Max 6|Win32.Build.0 = Release - Max 6|Win32
 		{466F2D3E-2663-4583-A05C-128683677617}.Release - Max 7|Win32.ActiveCfg = Release - Max 7|Win32
-- 
GitLab