Fixed: #1333 Support 3ds Max 2012 SDK.

This commit is contained in:
kaetemi 2011-08-13 23:36:37 +02:00
parent def2f88c55
commit 1651f8510b
19 changed files with 143 additions and 45 deletions

View file

@ -12,32 +12,35 @@ endif(MAXSDK_INCLUDE_DIR)
find_path(MAXSDK_INCLUDE_DIR max.h
PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/include"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include"
)
find_path(MAXSDK_CS_INCLUDE_DIR bipexp.h
PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/include/CS"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include/CS"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include/CS"
)
MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME}
PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/lib"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/lib"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/lib"
)
)
ENDMACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_3DS_LIBRARY(MAXSDK_CORE_LIBRARY core)

View file

@ -41,7 +41,7 @@ IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
NAMES freetype libfreetype freetype219 freetype246
PATHS
$ENV{FREETYPE_DIR}/lib
/usr/local/lib

View file

@ -18,6 +18,7 @@
#include "nel/misc/app_context.h"
#include <nel/misc/debug.h>
#include "../../plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <maxversion.h>
extern ClassDesc2* GetLigoscapeDesc();
@ -44,7 +45,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
if (!controlsInit)
{
controlsInit = TRUE;
#if MAX_VERSION_MAJOR < 14
InitCustomControls(hInstance); // Initialize MAX's custom controls
#endif
InitCommonControls(); // Initialize Win95 controls
}

View file

@ -17,7 +17,12 @@
#include <assert.h>
// From MAXSDK
#include <MaxScrpt/maxscrpt.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/maxscript.h>
#else
# include <MaxScrpt/maxscrpt.h>
#endif
#include "max_to_ligo.h"

View file

@ -19,17 +19,30 @@
#include <assert.h>
// Various MAX and MXS includes
#include <MaxScrpt/MAXScrpt.h>
#include <MaxScrpt/3dmath.h>
#include <MaxScrpt/Numbers.h>
#include <MaxScrpt/MAXclses.h>
#include <MaxScrpt/Streams.h>
#include <MaxScrpt/MSTime.h>
#include <MaxScrpt/MAXObj.h>
#include <MaxScrpt/Parser.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/maxscript.h>
# include <maxscript/foundation/3dmath.h>
# include <maxscript/foundation/numbers.h>
# include <maxscript/maxwrapper/maxclasses.h>
# include <maxscript/foundation/streams.h>
# include <maxscript/foundation/mxstime.h>
# include <maxscript/maxwrapper/mxsobjects.h>
# include <maxscript/compiler/parser.h>
# include <maxscript/foundation/functions.h>
#else
# include <MaxScrpt/MAXScrpt.h>
# include <MaxScrpt/3dmath.h>
# include <MaxScrpt/Numbers.h>
# include <MaxScrpt/MAXclses.h>
# include <MaxScrpt/Streams.h>
# include <MaxScrpt/MSTime.h>
# include <MaxScrpt/MAXObj.h>
# include <MaxScrpt/Parser.h>
# include <MaxScrpt/definsfn.h>
#endif
#include <max.h>
#include <stdmat.h>
#include <MaxScrpt/definsfn.h>
// Visual
#include <direct.h>

View file

@ -19,7 +19,7 @@
#include "nel/3d/register_3d.h"
#include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <maxversion.h>
extern ClassDesc2* GetCNelExportDesc();
@ -42,7 +42,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
if (!controlsInit) {
controlsInit = TRUE;
#if MAX_VERSION_MAJOR < 14
InitCustomControls(hInstance); // Initialize MAX's custom controls
#endif
InitCommonControls(); // Initialize Win95 controls
}

View file

@ -16,7 +16,12 @@
#include "std_afx.h"
#include "nel_export.h"
#include <MaxScrpt/strings.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/foundation/strings.h>
#else
# include <MaxScrpt/strings.h>
#endif
#include "../nel_mesh_lib/export_nel.h"
#include "../nel_mesh_lib/export_appdata.h"

View file

@ -26,16 +26,29 @@
#include <utilapi.h>
#include <shlobj.h>
#undef STRICT
#include <MaxScrpt/maxscrpt.h>
#include <MaxScrpt/3dmath.h>
#include <MaxScrpt/numbers.h>
#include <MaxScrpt/maxclses.h>
#include <MaxScrpt/streams.h>
#include <MaxScrpt/mstime.h>
#include <MaxScrpt/maxobj.h>
#include <MaxScrpt/parser.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/maxscript.h>
# include <maxscript/foundation/3dmath.h>
# include <maxscript/foundation/numbers.h>
# include <maxscript/maxwrapper/maxclasses.h>
# include <maxscript/foundation/streams.h>
# include <maxscript/foundation/mxstime.h>
# include <maxscript/maxwrapper/mxsobjects.h>
# include <maxscript/compiler/parser.h>
# include <maxscript/foundation/functions.h>
#else
# include <MaxScrpt/maxscrpt.h>
# include <MaxScrpt/3dmath.h>
# include <MaxScrpt/numbers.h>
# include <MaxScrpt/maxclses.h>
# include <MaxScrpt/streams.h>
# include <MaxScrpt/mstime.h>
# include <MaxScrpt/maxobj.h>
# include <MaxScrpt/parser.h>
# include <MaxScrpt/definsfn.h>
#endif
#include <stdmat.h>
#include <MaxScrpt/definsfn.h>
#include <animtbl.h>
#ifdef min
#undef min

View file

@ -32,7 +32,12 @@
#include <stdmat.h>
#include <shaders.h>
#include <iparamb2.h>
#include <Maxscrpt/maxscrpt.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/maxscript.h>
#else
# include <MaxScrpt/maxscrpt.h>
#endif
//#include <parser.h>
// Character Studio SDK include

View file

@ -260,7 +260,11 @@ Control* CExportNel::getControlerByName (Animatable& node, const char* sName)
if (strcmp (paramDef.int_name, sName)==0)
{
// ok, return this subanim
#if MAX_VERSION_MAJOR >= 14
return param->GetControllerByID(id);
#else
return param->GetController(id);
#endif
}
}
}

View file

@ -15,8 +15,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
#include <MaxScrpt/parser.h>
#include <MaxScrpt/strings.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/compiler/parser.h>
# include <maxscript/foundation/strings.h>
#else
# include <MaxScrpt/parser.h>
# include <MaxScrpt/strings.h>
#endif
#include "export_nel.h"
#include "export_appdata.h"

View file

@ -20,6 +20,7 @@
#include "nel/misc/debug.h"
#include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <maxversion.h>
extern ClassDesc2* GetPO2RPODesc();
extern ClassDesc* GetRPODesc();
@ -58,7 +59,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{
// This method has been deprecated.
controlsInit = TRUE;
#if MAX_VERSION_MAJOR < 14
InitCustomControls(hInstance); // Initialize MAX's custom controls
#endif
InitCommonControls(); // Initialize Win95 controls
}
return (TRUE);

View file

@ -22,24 +22,38 @@
#define _CRT_SECURE_NO_DEPRECATE
#include <assert.h>
#include <MaxScrpt/maxscrpt.h>
#include <MaxScrpt/3dmath.h>
// Various MAX and MXS includes
#include <MaxScrpt/Numbers.h>
#include <MaxScrpt/MAXclses.h>
#include <MaxScrpt/Streams.h>
#include <MaxScrpt/MSTime.h>
#include <MaxScrpt/MAXObj.h>
#include <MaxScrpt/Parser.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/maxscript.h>
# include <maxscript/foundation/3dmath.h>
# include <maxscript/foundation/numbers.h>
# include <maxscript/maxwrapper/maxclasses.h>
# include <maxscript/foundation/streams.h>
# include <maxscript/foundation/mxstime.h>
# include <maxscript/maxwrapper/mxsobjects.h>
# include <maxscript/compiler/parser.h>
# include <maxscript/foundation/functions.h>
#else
# include <MaxScrpt/maxscrpt.h>
# include <MaxScrpt/3dmath.h>
// Various MAX and MXS includes
# include <MaxScrpt/Numbers.h>
# include <MaxScrpt/MAXclses.h>
# include <MaxScrpt/Streams.h>
# include <MaxScrpt/MSTime.h>
# include <MaxScrpt/MAXObj.h>
# include <MaxScrpt/Parser.h>
// define the new primitives using macros from SDK
# include <MaxScrpt/definsfn.h>
#endif
#include <modstack.h>
#include <decomp.h>
#include <max.h>
#include <stdmat.h>
// define the new primitives using macros from SDK
#include <MaxScrpt/definsfn.h>
#undef _CRT_SECURE_NO_DEPRECATE
@ -109,9 +123,9 @@ def_visible_primitive( set_tile_bank, "NelSetTileBank");
def_visible_primitive( export_zone, "ExportRykolZone");
def_visible_primitive( import_zone, "NeLImportZone");
/* permettre l'acces à auto/manual intrior edges
/* permettre l'acces <EFBFBD>Eauto/manual intrior edges
faire une methode pour interfacer la fonction compute interior edge
donner un acces à tiledmode/patchmode (on/off)
donner un acces <EFBFBD>Etiledmode/patchmode (on/off)
faire un getselectedvertex
faire un getselectedpatch
faire un getselectedtile */

View file

@ -17,6 +17,8 @@
#include <nel/misc/debug.h>
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <maxversion.h>
HINSTANCE hInstance;
int controlsInit = FALSE;
@ -42,7 +44,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
controlsInit = TRUE;
// jaguar controls
#if MAX_VERSION_MAJOR < 14
InitCustomControls(hInstance);
#endif
#ifdef OLD3DCONTROLS
// initialize 3D controls

View file

@ -18,7 +18,12 @@
// For MAX_RELEASE
#include <plugapi.h>
#include <MaxScrpt/maxscrpt.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/maxscript.h>
#else
# include <MaxScrpt/maxscrpt.h>
#endif
#include "rpo.h"
#include "nel/3d/zone.h"

View file

@ -3,6 +3,7 @@
#include "nel/misc/debug.h"
#include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <maxversion.h>
HINSTANCE hInstance;
int controlsInit = FALSE;
@ -26,7 +27,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
controlsInit = TRUE;
// jaguar controls
#if MAX_VERSION_MAJOR < 14
InitCustomControls(hInstance);
#endif
#ifdef OLD3DCONTROLS
// initialize 3D controls

View file

@ -3,7 +3,12 @@
#include "resource.h"
#include <algorithm>
#include <MaxScrpt/maxscrpt.h>
#include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14
# include <maxscript/maxscript.h>
#else
# include <MaxScrpt/maxscrpt.h>
#endif
#include "namesel.h"
#include "nsclip.h"
#include "sbmtlapi.h"

View file

@ -1,6 +1,6 @@
#include "vertex_tree_paint.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <maxversion.h>
HINSTANCE hInstance;
@ -18,7 +18,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
#if MAX_VERSION_MAJOR < 14
InitCustomControls(hInstance); // Initialize MAX's custom controls
#endif
InitCommonControls(); // Initialize Win95 controls
break;
}

View file

@ -20,6 +20,7 @@
#include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <vector>
#include <maxversion.h>
extern ClassDesc2* GetTile_utilityDesc();
extern ClassDesc* GetRGBAddDesc();
@ -46,7 +47,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
if (!controlsInit) {
controlsInit = TRUE;
#if MAX_VERSION_MAJOR < 14
InitCustomControls(hInstance); // Initialize MAX's custom controls
#endif
InitCommonControls(); // Initialize Win95 controls
}