2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAMax.
6
Portions of the code are:
7
Copyright (c) 2005-2007 Feeling Software Inc.
8
Copyright (c) 2005-2007 Sony Computer Entertainment America
10
Based on the 3dsMax COLLADASW Tools:
11
Copyright (c) 2005-2006 Autodesk Media Entertainment
13
Licensed under the MIT Open Source License,
14
for details please see LICENSE file or the website
15
http://www.opensource.org/licenses/mit-license.php
19
#include "COLLADAMaxStableHeaders.h"
21
#include "COLLADAMaxColladaExporter.h"
22
#include "COLLADAMaxColladaImporter.h"
23
#include "COLLADAMaxGoogleWarehouse.h"
25
#include "COLLADAMaxColladaPlugin.h"
27
#include "COLLADAMaxVersionInfo.h"
30
int controlsInit = FALSE;
33
static const COLLADAMax::WideString LIBDESCRIPTION = L"OpenCOLLADA" +
34
(_tcslen(COLLADAMax::COLLADAPlugin::PLUGIN_VERSION_TCHAR) == 0 ? L"" : (COLLADAMax::WideString(L" ") + COLLADAMax::COLLADAPlugin::PLUGIN_VERSION_TCHAR))+
35
(COLLADAMax::COLLADAPlugin::REVISION_STRING.empty() ? COLLADAMax::WideString(L"") : (COLLADAMax::WideString(L" ") + COLLADABU::StringUtils::toWideString(COLLADAMax::COLLADAPlugin::REVISION_STRING.c_str()) ));
37
static const COLLADAMax::String LIBDESCRIPTION = "OpenCOLLADA" +
38
(_tcslen(COLLADAMax::COLLADAPlugin::PLUGIN_VERSION_TCHAR) == 0 ? "" : (COLLADAMax::String(" ") + COLLADAMax::COLLADAPlugin::PLUGIN_VERSION_TCHAR))+
39
(COLLADAMax::COLLADAPlugin::REVISION_STRING.empty() ? "" : (COLLADAMax::String(" ") + COLLADAMax::COLLADAPlugin::REVISION_STRING));
42
BOOL WINAPI DllMain ( HINSTANCE hinstDLL, ULONG fdwReason, LPVOID UNUSED ( lpvReserved ) )
47
case DLL_PROCESS_ATTACH:
49
#if MAX_VERSION_MAJOR < 10
51
InitCustomControls ( hInstance );
52
#endif // pre-Max 2008 only.
56
case DLL_PROCESS_DETACH:
63
extern "C" __declspec ( dllexport ) const TCHAR* LibDescription()
65
return LIBDESCRIPTION.c_str();
68
extern "C" __declspec ( dllexport ) int LibNumberClasses()
74
extern "C" __declspec ( dllexport ) ClassDesc* LibClassDesc ( int i )
80
return COLLADAMax::getCOLLADAExporterDesc();
82
return COLLADAMax::getCOLLADAImporterDesc();
84
return COLLADAMax::getGoogleWarehouseDesc();
92
extern "C" __declspec ( dllexport ) ULONG LibVersion()
94
return VERSION_3DSMAX;
98
// Let the plug-in register itself for deferred loading
99
extern "C" __declspec ( dllexport ) ULONG CanAutoDefer()
104
TCHAR* GetString ( int id )
106
static TCHAR buf[ 1024 ];
107
return ( hInstance && LoadString ( hInstance, id, buf, sizeof ( buf ) ) ) ? buf : 0;