Commit 36267d49 authored by figment's avatar figment
Browse files

1. Add skyrim specific checks and modification support.

2. Fix the installer locations
parent c3f9b045
......@@ -8,7 +8,7 @@ MaxSDKVersion=0
ShortDescription=Netimmerse/Gamebryo
; KnownApplications - Used to indicate which sections in the ini file point
; to "Applications" which have their own settings in a section below.
KnownApplications=Oblivion;Morrowind;Civilization 4;Fallout 3;Dark Age of Camelot;Freedom Force;Freedom Force vs. the 3rd Reich;Star Trek: Bridge Commander;Loki;Imagine;Emerge;Pro Cycling Manager;User
KnownApplications=Skyrim;Oblivion;Morrowind;Civilization 4;Fallout 3;Dark Age of Camelot;Freedom Force;Freedom Force vs. the 3rd Reich;Star Trek: Bridge Commander;Loki;Imagine;Emerge;Pro Cycling Manager;User
; Reparse the Applications (and therefore Texture directory cache) on every import/export
Reparse=0
; Website - Primary website
......@@ -419,13 +419,14 @@ ExtractFolder=$(RootPath)
MeshRootPath=${ExtractFolder}\Meshes
TextureRootPath=${ExtractFolder}\Textures
UseSkeleton=1
Skeleton=${MeshRootPath}\characters\_male\skeleton.nif
Skeleton=${MeshRootPath}\actors\character\character assets\skeleton.nif
RootPaths=${RootPath};${MeshRootPath};${TextureRootPath}
TextureRootPaths=${RootPath};${TextureRootPath}
TextureExtensions=.dds;
TextureSearchPaths=${RootPath}\Textures;${TextureRootPath}\Characters;${TextureRootPath}\Armor
SupportPrnStrings=1
Rotate90Degrees=Bip?? Head
Rotate90Degrees=NPC Head
SkeletonCheck=NPC*
[User]
NiVersion=20.0.0.5
......
......@@ -55,104 +55,104 @@ Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme ignoreversion;
;Source: "Staging\Win32\Release - gmax\Readme.txt"; DestName: "NifPlugins_Readme.txt"; DestDir: "{code:InstallPath|gmax12}"; Components: "gmax12"; Flags: isreadme ignoreversion;
Source: "\gmax12\winmm.dll"; DestDir: "{code:InstallPath|gmax12}"; Components: "gmax12"; Flags: ignoreversion;
Source: "Staging\Win32\Release - gmax\NifPlugins.dlu"; DestDir: "{code:InstallPath|gmax12}{\}plugins"; Components: "gmax12"; Flags: ignoreversion;
Source: "Staging\Win32\Release - gmax\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|gmax12}{\}plugins"; Components: "gmax12"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|gmax12}{\}plugcfg"; Components: "gmax12"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|gmax12}{\}plugins"; Components: "gmax12"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|gmax12}{\}plugins"; Components: "gmax12"; Flags: ignoreversion;
;Source: "Staging\Win32\Release - Max 4\Readme.txt"; DestName: "NifPlugins_Readme.txt"; DestDir: "{code:InstallPath|max4}"; Components: "max4"; Flags: isreadme ignoreversion;
;Source: "Staging\Win32\Release - Max 4\NifPlugins.dlu"; DestDir: "{code:InstallPath|max4}{\}plugins"; Components: "max4"; Flags: ignoreversion;
;Source: "Staging\Win32\Release - Max 4\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max4}{\}plugins"; Components: "max4"; Flags: ignoreversion;
;Source: "Staging\Win32\Release - Max 4\MaxNifTools.ini"; DestDir: "{code:InstallPath|max4}{\}plugcfg"; Components: "max4"; Flags: ignoreversion;
;Source: "Staging\Win32\Release - Max 4.2\Readme.txt"; DestName: "NifPlugins_Readme.txt"; DestDir: "{code:InstallPath|max42}"; Components: "max42"; Flags: isreadme ignoreversion;
;Source: "Staging\Win32\Release - Max 4.2\NifPlugins.dlu"; DestDir: "{code:InstallPath|max42}{\}plugins"; Components: "max42"; Flags: ignoreversion;
;Source: "Staging\Win32\Release - Max 4.2\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max42}{\}plugins"; Components: "max42"; Flags: ignoreversion;
;Source: "Staging\Win32\Release - Max 4.2\MaxNifTools.ini"; DestDir: "{code:InstallPath|max42}{\}plugcfg"; Components: "max42"; Flags: ignoreversion;
;Source: "..\NifMopp\Win32\NifMopp.dll" DestDir: "{code:InstallPath|max42}{\}plugins"; Components: "gmax12"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 5\NifPlugins.dlu"; DestDir: "{code:InstallPath|max5}{\}plugins"; Components: "max5"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 5\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max5}{\}plugins"; Components: "max5"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max5}{\}plugcfg"; Components: "max5"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max5}{\}plugins"; Components: "max5"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max5}{\}plugins"; Components: "max5"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 6\NifPlugins.dlu"; DestDir: "{code:InstallPath|max6}{\}plugins"; Components: "max6"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 6\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max6}{\}plugins"; Components: "max6"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max6}{\}plugcfg"; Components: "max6"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max6}{\}plugins"; Components: "max6"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max6}{\}plugins"; Components: "max6"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 7\NifPlugins.dlu"; DestDir: "{code:InstallPath|max7}{\}plugins"; Components: "max7"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 7\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max7}{\}plugins"; Components: "max7"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max7}{\}plugcfg"; Components: "max7"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max7}{\}plugins"; Components: "max7"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max7}{\}plugins"; Components: "max7"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 8\NifPlugins.dlu"; DestDir: "{code:InstallPath|max8}{\}plugins"; Components: "max8"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 8\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max8}{\}plugins"; Components: "max8"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max8}{\}plugcfg"; Components: "max8"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max8}{\}plugins"; Components: "max8"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max8}{\}plugins"; Components: "max8"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 9\NifPlugins.dlu"; DestDir: "{code:InstallPath|max9}{\}plugins"; Components: "max9"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 9\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max9}{\}plugins"; Components: "max9"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max9}{\}plugcfg"; Components: "max9"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\9 - 32bit\enu\plugcfg"; Components: "max9"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max9}{\}plugins"; Components: "max9"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max9}{\}plugins"; Components: "max9"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 9\NifPlugins.dlu"; DestDir: "{code:InstallPath|max9x64}{\}plugins"; Components: "max9x64"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 9\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max9x64}{\}plugins"; Components: "max9x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max9x64}{\}plugcfg"; Components: "max9x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\9 - 64bit\enu\plugcfg"; Components: "max9x64"; Flags: ignoreversion;
Source: "..\NifMagic\x64\NifMagic.dll"; DestDir: "{code:InstallPath|max9x64}{\}plugins"; Components: "max9x64"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2008\NifPlugins.dlu"; DestDir: "{code:InstallPath|max10}{\}plugins"; Components: "max10"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2008\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max10}{\}plugins"; Components: "max10"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max10}{\}plugcfg"; Components: "max10"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2008 - 32bit\enu\plugcfg"; Components: "max10"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max10}{\}plugins"; Components: "max10"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max10}{\}plugins"; Components: "max10"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2008\NifPlugins.dlu"; DestDir: "{code:InstallPath|max10x64}{\}plugins"; Components: "max10x64"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2008\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max10x64}{\}plugins"; Components: "max10x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max10x64}{\}plugcfg"; Components: "max10x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\10 - 64bit\enu\plugcfg"; Components: "max10x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2008 - 64bit\enu\plugcfg"; Components: "max10x64"; Flags: ignoreversion;
Source: "..\NifMagic\x64\NifMagic.dll"; DestDir: "{code:InstallPath|max10x64}{\}plugins"; Components: "max10x64"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2009\NifPlugins.dlu"; DestDir: "{code:InstallPath|max11}{\}plugins"; Components: "max11"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2009\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max11}{\}plugins"; Components: "max11"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max11}{\}plugcfg"; Components: "max11"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2009 - 32bit\enu\plugcfg"; Components: "max11"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max11}{\}plugins"; Components: "max11"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max11}{\}plugins"; Components: "max11"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2009\NifPlugins.dlu"; DestDir: "{code:InstallPath|max11x64}{\}plugins"; Components: "max11x64"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2009\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max11x64}{\}plugins"; Components: "max11x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max11x64}{\}plugcfg"; Components: "max11x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\11 - 64bit\enu\plugcfg"; Components: "max11x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2009 - 64bit\enu\plugcfg"; Components: "max11x64"; Flags: ignoreversion;
Source: "..\NifMagic\x64\NifMagic.dll"; DestDir: "{code:InstallPath|max11x64}{\}plugins"; Components: "max11x64"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2010\NifPlugins.dlu"; DestDir: "{code:InstallPath|max12}{\}plugins"; Components: "max12"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2010\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max12}{\}plugins"; Components: "max12"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max12}{\}plugcfg"; Components: "max12"; Flags: ignoreversion
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2010 - 32bit\enu\plugcfg"; Components: "max12"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max12}{\}plugins"; Components: "max12"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max12}{\}plugins"; Components: "max12"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2010\NifPlugins.dlu"; DestDir: "{code:InstallPath|max12x64}{\}plugins"; Components: "max12x64"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2010\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max12x64}{\}plugins"; Components: "max12x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max12x64}{\}plugcfg"; Components: "max12x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\12 - 64bit\enu\plugcfg"; Components: "max12x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2010 - 64bit\enu\plugcfg"; Components: "max12x64"; Flags: ignoreversion;
Source: "..\NifMagic\x64\NifMagic.dll"; DestDir: "{code:InstallPath|max12x64}{\}plugins"; Components: "max12x64"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2011\NifPlugins.dlu"; DestDir: "{code:InstallPath|max13}{\}plugins"; Components: "max13"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2011\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max13}{\}plugins"; Components: "max13"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max13}{\}plugcfg"; Components: "max13"; Flags: ignoreversion
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2011 - 32bit\enu\plugcfg"; Components: "max13"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max13}{\}plugins"; Components: "max13"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max13}{\}plugins"; Components: "max13"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2011\NifPlugins.dlu"; DestDir: "{code:InstallPath|max13x64}{\}plugins"; Components: "max13x64"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2011\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max13x64}{\}plugins"; Components: "max13x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max13x64}{\}plugcfg"; Components: "max13x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\13 - 64bit\enu\plugcfg"; Components: "max13x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2011 - 64bit\enu\plugcfg"; Components: "max13x64"; Flags: ignoreversion;
Source: "..\NifMagic\x64\NifMagic.dll"; DestDir: "{code:InstallPath|max13x64}{\}plugins"; Components: "max13x64"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2012\NifPlugins.dlu"; DestDir: "{code:InstallPath|max14}{\}plugins"; Components: "max14"; Flags: ignoreversion;
Source: "Staging\Win32\Release - Max 2012\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max14}{\}plugins"; Components: "max14"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max14}{\}plugcfg"; Components: "max14"; Flags: ignoreversion
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2012 - 32bit\enu\plugcfg"; Components: "max14"; Flags: ignoreversion;
Source: "..\NifMopp\Win32\NifMopp.dll"; DestDir: "{code:InstallPath|max14}{\}plugins"; Components: "max14"; Flags: ignoreversion;
Source: "..\NifMagic\Win32\NifMagic.dll"; DestDir: "{code:InstallPath|max14}{\}plugins"; Components: "max14"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2012\NifPlugins.dlu"; DestDir: "{code:InstallPath|max14x64}{\}plugins"; Components: "max14x64"; Flags: ignoreversion;
Source: "Staging\x64\Release - Max 2012\NifPlugins\NifPlugins.dlu"; DestDir: "{code:InstallPath|max14x64}{\}plugins"; Components: "max14x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{code:InstallPath|max14x64}{\}plugcfg"; Components: "max14x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\14 - 64bit\enu\plugcfg"; Components: "max14x64"; Flags: ignoreversion;
Source: "MaxNifTools.ini"; DestDir: "{localappdata}{\}Autodesk\3dsmax\2012 - 64bit\enu\plugcfg"; Components: "max14x64"; Flags: ignoreversion;
Source: "..\NifMagic\x64\NifMagic.dll"; DestDir: "{code:InstallPath|max14x64}{\}plugins"; Components: "max14x64"; Flags: ignoreversion;
;Source: "src\*"; DestDir: "{reg:HKLM\SOFTWARE\Bethesda Softworks\Oblivion,Path|{pf}{\}Bethesda Softworks\Oblivion}\Data\niftools"; Components: "src"; Flags: ignoreversion recursesubdirs;
......@@ -178,6 +178,7 @@ var i: Integer;
FF3RDataDirPage: TInputDirWizardPage;
BCDataDirPage: TInputDirWizardPage;
F3DataDirPage: TInputDirWizardPage;
SKDataDirPage: TInputDirWizardPage;
function InitializeSetup(): Boolean;
begin
......@@ -225,6 +226,8 @@ begin
FF3RDataDirPage.ID: Result := not UsagePage.Values[6];
BCDataDirPage.ID: Result := not UsagePage.Values[7];
F3DataDirPage.ID: Result := not UsagePage.Values[8];
SKDataDirPage.ID: Result := not UsagePage.Values[9];
end;
end;
......@@ -246,6 +249,7 @@ begin
UsagePage.Add('Freedom Force vs. the 3rd Reich');
UsagePage.Add('Star Trek: Bridge Commander');
UsagePage.Add('Fallout 3');
UsagePage.Add('Skyrim');
{ Create pages for each Game texture locations }
OBDataDirPage := CreateInputDirPage(UsagePage.ID,
......@@ -319,6 +323,14 @@ begin
F3DataDirPage.OnShouldSkipPage := @DataDirPage_ShouldSkipPage;
F3DataDirPage.Add('Extracted Model Directory (e.g. root directory where NIF files are located)');
F3DataDirPage.Add('Extracted Textures Directory (e.g. root directory containing the Textures directory)');
SKDataDirPage := CreateInputDirPage(BCDataDirPage.ID,
'Select Skyrim Data Directory', 'Where are the extracted Skyrim data files located?',
'Select the folders in which 3ds Max should look for files, then click Next.',
False, '');
SKDataDirPage.OnShouldSkipPage := @DataDirPage_ShouldSkipPage;
SKDataDirPage.Add('Extracted Model Directory (e.g. root directory where NIF files are located)');
SKDataDirPage.Add('Extracted Textures Directory (e.g. root directory containing the Textures directory)');
{ Set default values, using settings that were stored last time if possible }
UsagePage.Values[0] := GetPrevDataBool('bOB', False);
......@@ -330,6 +342,7 @@ begin
UsagePage.Values[6] := GetPrevDataBool('bFF3R', False);
UsagePage.Values[7] := GetPrevDataBool('bBC', False);
UsagePage.Values[8] := GetPrevDataBool('bF3', False);
UsagePage.Values[9] := GetPrevDataBool('bSK', False);
OBDataDirPage.Values[0] := GetPreviousData('OBModelDir', '');
OBDataDirPage.Values[1] := GetPreviousData('OBTexDir', '');
......@@ -349,6 +362,8 @@ begin
BCDataDirPage.Values[1] := GetPreviousData('BCTexDir', '');
F3DataDirPage.Values[0] := GetPreviousData('F3ModelDir', '');
F3DataDirPage.Values[1] := GetPreviousData('F3TexDir', '');
SKDataDirPage.Values[0] := GetPreviousData('SKModelDir', '');
SKDataDirPage.Values[1] := GetPreviousData('SKTexDir', '');
end;
......@@ -386,6 +401,8 @@ begin
SetPreviousData(PreviousDataKey, 'BCTexDir', BCDataDirPage.Values[1]);
SetPreviousData(PreviousDataKey, 'F3ModelDir', F3DataDirPage.Values[0]);
SetPreviousData(PreviousDataKey, 'F3TexDir', F3DataDirPage.Values[1]);
SetPreviousData(PreviousDataKey, 'SKModelDir', SKDataDirPage.Values[0]);
SetPreviousData(PreviousDataKey, 'SKTexDir', SKDataDirPage.Values[1]);
end;
......@@ -652,16 +669,16 @@ begin
end;
end;
'3ds Max 2012 (Win32)':
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\13.0', Names) then begin
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\14.0', Names) then begin
for I := 0 to GetArrayLength(Names)-1 do begin
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\13.0\' + Names[I], 'InstallDir', Result) then
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\14.0\' + Names[I], 'InstallDir', Result) then
break;
end;
end;
'3ds Max 2012 (x64)':
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\13.0', Names) then begin
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\14.0', Names) then begin
for I := 0 to GetArrayLength(Names)-1 do begin
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\13.0\' + Names[I], 'InstallDir', Result) then
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Autodesk\3dsMax\14.0\' + Names[I], 'InstallDir', Result) then
break;
end;
end;
......@@ -741,6 +758,10 @@ begin
SetIniString('Fallout 3', 'MeshRootPath', F3DataDirPage.Values[0], iniFile);
SetIniString('Fallout 3', 'TextureRootPath', F3DataDirPage.Values[1], iniFile);
end;
if UsagePage.Values[9] then begin
SetIniString('Skyrim', 'MeshRootPath', SKDataDirPage.Values[0], iniFile);
SetIniString('Skyrim', 'TextureRootPath', SKDataDirPage.Values[1], iniFile);
end;
end;
end;
......
......@@ -68,6 +68,8 @@ void AppSettings::ReadSettings(string iniFile)
rotate90Degrees = TokenizeString(GetSetting<string>("Rotate90Degrees").c_str(), ";");
supportPrnStrings = GetSetting<bool>("SupportPrnStrings", supportPrnStrings);
doNotReuseExistingBones = GetSetting<bool>("DoNotReuseExistingBones", doNotReuseExistingBones);
skeletonCheck = GetSetting<string>("SkeletonCheck");
}
void AppSettings::WriteSettings(Interface *gi)
......
......@@ -52,6 +52,7 @@ public:
stringlist rotate90Degrees;
bool supportPrnStrings;
bool doNotReuseExistingBones;
string skeletonCheck;
static void Initialize(Interface *gi);
void ReadSettings(std::string iniFile);
......
......@@ -99,7 +99,7 @@ Exporter::Result Exporter::doExport(NiNodeRef &root, INode *node)
if (!Exporter::mSelectedOnly)
{
if (IsOblivion() || IsFallout3())
if (IsOblivion() || IsFallout3() || IsSkyrim())
{
if (mSkeletonOnly)
{
......@@ -127,7 +127,7 @@ Exporter::Result Exporter::doExport(NiNodeRef &root, INode *node)
{
BSXFlagsRef bsx = CreateNiObject<BSXFlags>();
bsx->SetName("BSX");
bsx->SetData( IsFallout3() ? 202 : 2 );
bsx->SetData( IsSkyrim() ? 198 : IsFallout3() ? 202 : 2 );
root->AddExtraData(DynamicCast<NiExtraData>(bsx));
}
}
......@@ -374,6 +374,10 @@ void Exporter::ProgressUpdate(ProgressSection section, const TCHAR *s)
mI->ProgressUpdate( (percent * 100) / total , s == NULL ? TRUE : FALSE, const_cast<TCHAR*>(s));
}
bool Exporter::IsSkyrim() const {
return (mNifVersionInt == 0x14020007 && mNifUserVersion == 12);
}
bool Exporter::IsFallout3() const {
return (mNifVersionInt == 0x14020007 && mNifUserVersion == 11);
}
......
......@@ -336,6 +336,7 @@ public:
bool IsFallout3() const;
bool IsOblivion() const;
bool IsMorrowind() const;
bool IsSkyrim() const;
/* Progress Bar stuff */
enum ProgressSection
......
......@@ -358,7 +358,7 @@ NiTriBasedGeomRef Exporter::makeMesh(NiNodeRef &parent, Mtl *mtl, FaceGroup &grp
data = new NiTriShapeData(grp.faces);
}
if ( IsFallout3() )
if ( IsFallout3() || IsSkyrim() )
shape->SetFlags( 14 );
data->SetVertices(grp.verts);
......@@ -367,7 +367,7 @@ NiTriBasedGeomRef Exporter::makeMesh(NiNodeRef &parent, Mtl *mtl, FaceGroup &grp
data->SetUVSetMap(grp.uvMapping);
int nUVs = grp.uvs.size();
if ( IsFallout3() )
if ( IsFallout3() || IsSkyrim() )
nUVs = min(1, nUVs);
data->SetUVSetCount(nUVs);
for (int i =0;i<nUVs; ++i) {
......@@ -724,7 +724,7 @@ bool Exporter::makeSkin(NiTriBasedGeomRef shape, INode *node, FaceGroup &grp, Ti
}
// Check for dismemberment
if (IsFallout3()) {
if (IsFallout3() || IsSkyrim()) {
Modifier *dismemberSkinMod = GetBSDismemberSkin(node);
if (dismemberSkinMod)
{
......@@ -864,7 +864,7 @@ NiNodeRef Exporter::exportBone(NiNodeRef parent, INode *node)
InitializeTimeController(new NiTransformController(), newParent);
bool isBoneRoot = false;
if (IsOblivion() || IsFallout3())
if (IsOblivion() || IsFallout3() || IsSkyrim())
{
// Check for Bone Root
TSTR upb;
......@@ -963,7 +963,7 @@ NiNodeRef Exporter::exportBone(NiNodeRef parent, INode *node)
NiNodeRef accumNode = createAccumNode(newParent, node);
// Transfer collision object to accum and create blend on accum
if (IsOblivion() || IsFallout3()) {
if (IsOblivion() || IsFallout3() || IsSkyrim()) {
InitializeTimeController(new bhkBlendController(), accumNode);
accumNode->SetCollisionObject(newParent->GetCollisionObject());
newParent->SetCollisionObject( NiCollisionObjectRef() );
......
......@@ -18,6 +18,7 @@
#include "obj/BSShaderNoLightingProperty.h"
#include "obj/BSShaderPPLightingProperty.h"
#include "obj/BSShaderTextureSet.h"
#include "obj/BSLightingShaderProperty.h"
#include "ObjectRegistry.h"
enum { C_BASE, C_DARK, C_DETAIL, C_GLOSS, C_GLOW, C_BUMP, C_NORMAL, C_UNK2,
......@@ -55,9 +56,15 @@ void Exporter::makeTexture(NiAVObjectRef &parent, Mtl *mtl)
return;
if (IsFallout3())
if (IsFallout3() || IsSkyrim())
{
BSShaderPPLightingPropertyRef texProp = new BSShaderPPLightingProperty();
BSShaderPPLightingPropertyRef texProp;
if (IsSkyrim()) {
texProp = new BSLightingShaderProperty();
} else {
texProp = new BSShaderPPLightingProperty();
}
texProp->SetFlags(1);
texProp->SetShaderType( SHADER_DEFAULT );
BSShaderTextureSetRef texset = new BSShaderTextureSet();
......@@ -153,7 +160,8 @@ void Exporter::makeTexture(NiAVObjectRef &parent, Mtl *mtl)
texset->SetTextures(textures);
parent->AddProperty(reinterpret_cast<NiProperty*>((NiObject*)texProp));
NiPropertyRef prop = DynamicCast<NiProperty>(texProp);
parent->AddProperty(prop);
}
else if (Exporter::mNifVersionInt >= VER_4_0_0_0)
{
......@@ -492,16 +500,19 @@ bool Exporter::exportNiftoolsShader(NiAVObjectRef parent, Mtl* mtl)
if (ok) // civ4 shader
{
NiMaterialPropertyRef mtlProp = CreateNiObject<NiMaterialProperty>();
parent->AddProperty(mtlProp);
mtlProp->SetName((char*)mtl->GetName());
mtlProp->SetAmbientColor(TOCOLOR3(ambient));
mtlProp->SetDiffuseColor(TOCOLOR3(diffuse));
mtlProp->SetSpecularColor(TOCOLOR3(specular));
mtlProp->SetEmissiveColor(TOCOLOR3(emittance));
mtlProp->SetGlossiness(shininess);
mtlProp->SetTransparency(alpha);
if ( !IsSkyrim() ) // skyrim does not use material properties
{
NiMaterialPropertyRef mtlProp = CreateNiObject<NiMaterialProperty>();
parent->AddProperty(mtlProp);
mtlProp->SetName((char*)mtl->GetName());
mtlProp->SetAmbientColor(TOCOLOR3(ambient));
mtlProp->SetDiffuseColor(TOCOLOR3(diffuse));
mtlProp->SetSpecularColor(TOCOLOR3(specular));
mtlProp->SetEmissiveColor(TOCOLOR3(emittance));
mtlProp->SetGlossiness(shininess);
mtlProp->SetTransparency(alpha);
}
if(mtl->ClassID() == Class_ID(DMTL_CLASS_ID, 0) )
{
StdMat2 * smtl = (StdMat2*)mtl;
......@@ -580,12 +591,20 @@ bool Exporter::exportNiftoolsShader(NiAVObjectRef parent, Mtl* mtl)
bool useDefaultShader = true;
if (IsFallout3())
if (IsFallout3() || IsSkyrim())
{
NiObjectRef root;
if (CustomShader == NULL || strlen(CustomShader) != 0)
if (CustomShader != NULL && strlen(CustomShader) != 0)
root = Niflib::ObjectRegistry::CreateObject(CustomShader);
if (root == NULL) {
if (IsSkyrim()) {
root = new BSLightingShaderProperty();
} else {
root = new BSShaderPPLightingProperty();
}
}
if ( BSShaderPPLightingPropertyRef texProp = DynamicCast<BSShaderPPLightingProperty>(root) )
{
......@@ -680,9 +699,8 @@ bool Exporter::exportNiftoolsShader(NiAVObjectRef parent, Mtl* mtl)
texset->SetTextures(textures);
// Hack to allow BSShaderPPLightingProperty to still be added to niflib maybe
parent->AddProperty(reinterpret_cast<NiProperty*>((NiObject*)texProp));
NiPropertyRef prop = DynamicCast<NiProperty>(texProp);
parent->AddProperty(prop);
useDefaultShader = false;
}
else if (BSShaderNoLightingPropertyRef texProp = StaticCast<BSShaderNoLightingProperty>(root))
......@@ -700,7 +718,8 @@ bool Exporter::exportNiftoolsShader(NiAVObjectRef parent, Mtl* mtl)
}
}
texProp->SetFileName( diffuseStr.data() );
parent->AddProperty(reinterpret_cast<NiProperty*>((NiObject*)texProp));
NiPropertyRef prop = DynamicCast<NiProperty>(texProp);
parent->AddProperty(prop);
useDefaultShader = false;
}
else if ( WaterShaderPropertyRef texProp = StaticCast<WaterShaderProperty>(root) )
......@@ -718,7 +737,8 @@ bool Exporter::exportNiftoolsShader(NiAVObjectRef parent, Mtl* mtl)
}
}
//texProp->SetFileName( string(diffuseStr.data()) );
parent->AddProperty(reinterpret_cast<NiProperty*>((NiObject*)texProp));
NiPropertyRef prop = DynamicCast<NiProperty>(texProp);
parent->AddProperty(prop);
useDefaultShader = false;
}
else if ( SkyShaderPropertyRef texProp = StaticCast<SkyShaderProperty>(root) )
......@@ -736,7 +756,8 @@ bool Exporter::exportNiftoolsShader(NiAVObjectRef parent, Mtl* mtl)
}
}
texProp->SetFileName( diffuseStr.data() );
parent->AddProperty(reinterpret_cast<NiProperty*>((NiObject*)texProp));
NiPropertyRef prop = DynamicCast<NiProperty>(texProp);
parent->AddProperty(prop);
useDefaultShader = false;
}
else if ( TallGrassShaderPropertyRef texProp = StaticCast<TallGrassShaderProperty>(root) )
......@@ -754,7 +775,8 @@ bool Exporter::exportNiftoolsShader(NiAVObjectRef parent, Mtl* mtl)
}
}
texProp->SetFileName( diffuseStr.data() );
parent->AddProperty(reinterpret_cast<NiProperty*>((NiObject*)texProp));
NiPropertyRef prop = DynamicCast<NiProperty>(texProp);
parent->AddProperty(prop);
useDefaultShader = false;
}
}
......
......@@ -499,7 +499,7 @@ int NifExport::DoExportInternal(const TCHAR *name, ExpInterface *ei, Interface *
Ref<NiNode> root = DynamicCast<NiNode>(Niflib::ObjectRegistry::CreateObject(Exporter::mRootType));
if (root == NULL)
root = new NiNode();
if ( exp.IsFallout3() )
if ( exp.IsFallout3() || exp.IsSkyrim() )
root->SetFlags(14);
Exporter::Result result = exp.doExport(root, i->GetRootNode());
......
......@@ -167,7 +167,7 @@ NiNodeRef Exporter::getNode(const string& name)
if (itr != mNameMap.end())
return (*itr).second;
NiNodeRef node = CreateNiObject<NiNode>();
if ( IsFallout3() ) {
if ( IsFallout3() || IsSkyrim() ) {
node->SetFlags( 14 );
}
node->SetName(name);
......
......@@ -565,7 +565,7 @@ bool CollisionImport::ImportPackedNiTriStripsShape(INode *rbody, bhkRigidBodyRef
vector<Triangle> tris = data->GetTriangles();
vector<Vector3> norms = data->GetNormals();
vector<Niflib::OblivionSubShape> subshapes = (ni.IsFallout3()) ? shape->GetSubShapes() : data->GetSubShapes();
vector<Niflib::OblivionSubShape> subshapes = (ni.IsFallout3() || ni.IsSkyrim()) ? shape->GetSubShapes() : data->GetSubShapes();
if (subshapes.size() == 0)
{
// Is this possible?
......
This diff is collapsed.
......@@ -233,6 +233,9 @@ void NifImporter::ApplyAppSettings()
supportPrnStrings = appSettings->supportPrnStrings;
doNotReuseExistingBones = appSettings->doNotReuseExistingBones;
if (!appSettings->skeletonCheck.empty())
skeletonCheck = appSettings->skeletonCheck;
}
}
......@@ -394,7 +397,9 @@ bool NifImporter::DoImport()
ImportAnimation();
return true;
}
bool NifImporter::IsSkyrim() const {
return (nifVersion == 0x14020007 && userVersion == 12);
}
bool NifImporter::IsFallout3() const {
return (nifVersion == 0x14020007 && userVersion == 11);
}
......
......@@ -165,6 +165,7 @@ public:
void WeldVertices(Mesh& mesh);
bool IsSkyrim() const;
bool IsFallout3() const;
bool IsOblivion() const;
bool IsMorrowind() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment