From 15aaca9bd161f36272167880f28e8e129e2292c7 Mon Sep 17 00:00:00 2001 From: pudingus <39903631+pudingus@users.noreply.github.com> Date: Sat, 26 Mar 2022 20:57:56 +0100 Subject: [PATCH] Add support for 3ds Max 2023 --- plugins/README.md | 76 ++++++++++++++++++++++++ plugins/nspec.sln | 12 +++- plugins/nspec/nspec_2023.vcxproj | 71 ++++++++++++++++++++++ plugins/nspec/nspec_2023.vcxproj.filters | 49 +++++++++++++++ scripts/max4ds/init.ms | 2 +- 5 files changed, 207 insertions(+), 3 deletions(-) create mode 100644 plugins/README.md create mode 100644 plugins/nspec/nspec_2023.vcxproj create mode 100644 plugins/nspec/nspec_2023.vcxproj.filters diff --git a/plugins/README.md b/plugins/README.md new file mode 100644 index 0000000..64b4395 --- /dev/null +++ b/plugins/README.md @@ -0,0 +1,76 @@ +# nspec + +This plugin exposes functions for MAXScript for modifying explicit normals. It exposes 'nspec' class and 'inspec' interface and it's functions +``` + GetNumNormals + GetNumFaces + GetNormal + GetNormalId + SetNumNormals + SetNumFaces + SetNormal + SetNormalId + SetNormalExplicit + GetNormalExplicit +``` +Sample usage: +``` +nspec.getnormal $.mesh 14 +``` +or +``` +nspec.inspec.getnormal $.mesh 14 +``` + +This is how I came up with the name 'nspec'... +I use a class called MeshNormalSpec from the SDK, so MeshNormalSpec -> NormalSpec -> nspec + +## Requirements + +This plugin requires Autodesk 3ds Max SDK and the SDK's dependencies + +https://www.autodesk.com/developer-network/platform-technologies/3ds-max#3dsmax-sdk + +The SDK also comes with the 3ds Max installer. + +**nspec_2014** +MSVC v100 (2010) +3ds Max 2014 SDK + +**nspec_2015** +MSVC v110 (2012) +3ds Max 2015 SDK + +**nspec_2017** +MSVC v140 (2015) +3ds Max 2017 SDK + +**nspec_2018** +MSVC v140 (2015) +Windows SDK 10.0.10586 +3ds Max 2018 SDK + +**nspec_2019** +MSVC v140 (2015) +Windows SDK 10.0.10586 +3ds Max 2019 SDK + +**nspec_2020** +MSVC v141 (2017) +Windows SDK 10.0.17134.0 +3ds Max 2020 SDK + +**nspec_2022** +MSVC v141 (2017) +Windows SDK 10.0.17134.0 +3ds Max 2022 SDK + +**nspec_2023** +MSVC v142 (2019) +Windows SDK 10.0.19041.0 +3ds Max 2023 SDK + +## Building +- Open 'nspec.sln' in Visual Studio +- Set the configuration to 'Release' +- Build \ No newline at end of file diff --git a/plugins/nspec.sln b/plugins/nspec.sln index 5953a64..ba29985 100644 --- a/plugins/nspec.sln +++ b/plugins/nspec.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31019.35 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32319.34 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nspec_2022", "nspec\nspec_2022.vcxproj", "{E614241F-075D-4EAD-B95F-2D40B9A7C168}" EndProject @@ -17,6 +17,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nspec_2015", "nspec\nspec_2 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nspec_2014", "nspec\nspec_2014.vcxproj", "{F3DB68C2-EC68-45E0-BC6F-41D1C0039A94}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nspec_2023", "nspec\nspec_2023.vcxproj", "{DD41347B-D5A8-4709-B984-19F68E295C1D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -66,6 +68,12 @@ Global {F3DB68C2-EC68-45E0-BC6F-41D1C0039A94}.Hybrid|x64.Build.0 = Hybrid|x64 {F3DB68C2-EC68-45E0-BC6F-41D1C0039A94}.Release|x64.ActiveCfg = Release|x64 {F3DB68C2-EC68-45E0-BC6F-41D1C0039A94}.Release|x64.Build.0 = Release|x64 + {DD41347B-D5A8-4709-B984-19F68E295C1D}.Debug|x64.ActiveCfg = Debug|x64 + {DD41347B-D5A8-4709-B984-19F68E295C1D}.Debug|x64.Build.0 = Debug|x64 + {DD41347B-D5A8-4709-B984-19F68E295C1D}.Hybrid|x64.ActiveCfg = Hybrid|x64 + {DD41347B-D5A8-4709-B984-19F68E295C1D}.Hybrid|x64.Build.0 = Hybrid|x64 + {DD41347B-D5A8-4709-B984-19F68E295C1D}.Release|x64.ActiveCfg = Release|x64 + {DD41347B-D5A8-4709-B984-19F68E295C1D}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/plugins/nspec/nspec_2023.vcxproj b/plugins/nspec/nspec_2023.vcxproj new file mode 100644 index 0000000..9d58ce1 --- /dev/null +++ b/plugins/nspec/nspec_2023.vcxproj @@ -0,0 +1,71 @@ + + + + + Debug + x64 + + + Hybrid + x64 + + + Release + x64 + + + + nspec_2023 + {DD41347B-D5A8-4709-B984-19F68E295C1D} + DynamicLibrary + $(ADSK_3DSMAX_SDK_2023) + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(ProjectDir)\bin\$(Configuration)_$(Platform)\2023\ + $(ProjectDir)\obj\$(Configuration)_$(Platform)\2023\ + nspec + .gup + + + true + + + + false + _USRDLL;%(PreprocessorDefinitions) + $(MaxSdkInc);%(AdditionalIncludeDirectories) + Level4 + EditAndContinue + + + $(MaxSdkLib);%(AdditionalLibraryDirectories) + bmm.lib;core.lib;geom.lib;gfx.lib;mesh.lib;maxutil.lib;maxscrpt.lib;gup.lib;paramblk2.lib;;%(AdditionalDependencies) + nspec.def + false + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/nspec/nspec_2023.vcxproj.filters b/plugins/nspec/nspec_2023.vcxproj.filters new file mode 100644 index 0000000..7a05d16 --- /dev/null +++ b/plugins/nspec/nspec_2023.vcxproj.filters @@ -0,0 +1,49 @@ + + + + + {fbad0f2d-faaa-4b0b-865c-583fac8ddcb1} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {92f20462-242f-4a0c-883e-b3c33819b84b} + h;hpp;hxx;hm;inl + + + {ad6e765e-4300-41dc-b185-05b019286785} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + + + Source Files + + + \ No newline at end of file diff --git a/scripts/max4ds/init.ms b/scripts/max4ds/init.ms index 944d5f8..03509b7 100644 --- a/scripts/max4ds/init.ms +++ b/scripts/max4ds/init.ms @@ -2,7 +2,7 @@ local set_heapsize = 64 * 1024 * 1024 --64 MiB if heapsize < set_heapsize then heapsize = set_heapsize - global Max4ds_version = "v0.8.3" + global Max4ds_version = "v0.8.4" --global Max4ds_scriptsPath = getFilenamePath (getThisScriptFilename()) fn DisableScript file = (