Fixed: #1333 Support 3ds Max 2012 SDK.

hg/feature/gsoc2012-fabien
kaetemi 13 years ago
parent 5414a32525
commit d98511337d

@ -12,31 +12,34 @@ endif(MAXSDK_INCLUDE_DIR)
find_path(MAXSDK_INCLUDE_DIR max.h find_path(MAXSDK_INCLUDE_DIR max.h
PATHS 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 2010 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 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 2008 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 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 find_path(MAXSDK_CS_INCLUDE_DIR bipexp.h
PATHS 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 2010 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 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 2008 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 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) MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY} FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME} NAMES ${MYLIBRARYNAME}
PATHS 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 2010 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 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 2008 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 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) ENDMACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)

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

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

@ -17,7 +17,12 @@
#include <assert.h> #include <assert.h>
// From MAXSDK // 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" #include "max_to_ligo.h"

@ -19,17 +19,30 @@
#include <assert.h> #include <assert.h>
// Various MAX and MXS includes // Various MAX and MXS includes
#include <MaxScrpt/MAXScrpt.h> #include <maxversion.h>
#include <MaxScrpt/3dmath.h> #if MAX_VERSION_MAJOR >= 14
#include <MaxScrpt/Numbers.h> # include <maxscript/maxscript.h>
#include <MaxScrpt/MAXclses.h> # include <maxscript/foundation/3dmath.h>
#include <MaxScrpt/Streams.h> # include <maxscript/foundation/numbers.h>
#include <MaxScrpt/MSTime.h> # include <maxscript/maxwrapper/maxclasses.h>
#include <MaxScrpt/MAXObj.h> # include <maxscript/foundation/streams.h>
#include <MaxScrpt/Parser.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 <max.h>
#include <stdmat.h> #include <stdmat.h>
#include <MaxScrpt/definsfn.h>
// Visual // Visual
#include <direct.h> #include <direct.h>

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

@ -16,7 +16,12 @@
#include "std_afx.h" #include "std_afx.h"
#include "nel_export.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_nel.h"
#include "../nel_mesh_lib/export_appdata.h" #include "../nel_mesh_lib/export_appdata.h"

@ -26,16 +26,29 @@
#include <utilapi.h> #include <utilapi.h>
#include <shlobj.h> #include <shlobj.h>
#undef STRICT #undef STRICT
#include <MaxScrpt/maxscrpt.h> #include <maxversion.h>
#include <MaxScrpt/3dmath.h> #if MAX_VERSION_MAJOR >= 14
#include <MaxScrpt/numbers.h> # include <maxscript/maxscript.h>
#include <MaxScrpt/maxclses.h> # include <maxscript/foundation/3dmath.h>
#include <MaxScrpt/streams.h> # include <maxscript/foundation/numbers.h>
#include <MaxScrpt/mstime.h> # include <maxscript/maxwrapper/maxclasses.h>
#include <MaxScrpt/maxobj.h> # include <maxscript/foundation/streams.h>
#include <MaxScrpt/parser.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 <stdmat.h>
#include <MaxScrpt/definsfn.h>
#include <animtbl.h> #include <animtbl.h>
#ifdef min #ifdef min
#undef min #undef min

@ -32,7 +32,12 @@
#include <stdmat.h> #include <stdmat.h>
#include <shaders.h> #include <shaders.h>
#include <iparamb2.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> //#include <parser.h>
// Character Studio SDK include // Character Studio SDK include

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

@ -15,8 +15,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h" #include "stdafx.h"
#include <MaxScrpt/parser.h> #include <maxversion.h>
#include <MaxScrpt/strings.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_nel.h"
#include "export_appdata.h" #include "export_appdata.h"

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

@ -22,24 +22,38 @@
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE
#include <assert.h> #include <assert.h>
#include <MaxScrpt/maxscrpt.h>
#include <MaxScrpt/3dmath.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 // Various MAX and MXS includes
#include <MaxScrpt/Numbers.h> # include <MaxScrpt/Numbers.h>
#include <MaxScrpt/MAXclses.h> # include <MaxScrpt/MAXclses.h>
#include <MaxScrpt/Streams.h> # include <MaxScrpt/Streams.h>
#include <MaxScrpt/MSTime.h> # include <MaxScrpt/MSTime.h>
#include <MaxScrpt/MAXObj.h> # include <MaxScrpt/MAXObj.h>
#include <MaxScrpt/Parser.h> # include <MaxScrpt/Parser.h>
// define the new primitives using macros from SDK
# include <MaxScrpt/definsfn.h>
#endif
#include <modstack.h> #include <modstack.h>
#include <decomp.h> #include <decomp.h>
#include <max.h> #include <max.h>
#include <stdmat.h> #include <stdmat.h>
// define the new primitives using macros from SDK
#include <MaxScrpt/definsfn.h>
#undef _CRT_SECURE_NO_DEPRECATE #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( export_zone, "ExportRykolZone");
def_visible_primitive( import_zone, "NeLImportZone"); 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 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 getselectedvertex
faire un getselectedpatch faire un getselectedpatch
faire un getselectedtile */ faire un getselectedtile */

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

@ -18,7 +18,12 @@
// For MAX_RELEASE // For MAX_RELEASE
#include <plugapi.h> #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 "rpo.h"
#include "nel/3d/zone.h" #include "nel/3d/zone.h"

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

@ -3,7 +3,12 @@
#include "resource.h" #include "resource.h"
#include <algorithm> #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 "namesel.h"
#include "nsclip.h" #include "nsclip.h"
#include "sbmtlapi.h" #include "sbmtlapi.h"

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

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

Loading…
Cancel
Save