/project/max5_import/main_import.cpp

http://narutortsproject.googlecode.com/ · C++ · 55 lines · 45 code · 8 blank · 2 comment · 2 complexity · 689d53cc8a256f9a16f09264cb236e10 MD5 · raw file

  1. #include "n3dimport.h"
  2. HINSTANCE hInstance;
  3. bool ControlsInit = false;
  4. class MyPlugClassDesc : public ClassDesc
  5. {
  6. public:
  7. int IsPublic() { return 1; }
  8. void *Create(BOOL Loading = FALSE) { return new MyImp; }
  9. const TCHAR *ClassName() { return _T("Naruto Import"); }
  10. SClass_ID SuperClassID() { return SCENE_IMPORT_CLASS_ID; }
  11. Class_ID ClassID() { return N3D_IMPORT_CLASS_ID; }
  12. const TCHAR *Category() { return _T(""); }
  13. };
  14. static MyPlugClassDesc MyPlugCD;
  15. BOOL APIENTRY DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
  16. {
  17. hInstance = hModule;
  18. if (!ControlsInit)
  19. {
  20. ControlsInit = true;
  21. //InitCustomControls(hInstance);
  22. //InitCommonControls();
  23. }
  24. return TRUE;
  25. }
  26. __declspec(dllexport) int LibNumberClasses()
  27. {
  28. return 1;
  29. }
  30. __declspec(dllexport) ClassDesc *LibClassDesc(int i)
  31. {
  32. switch (i)
  33. {
  34. case 0:
  35. return &MyPlugCD;
  36. default:
  37. return 0;
  38. }
  39. }
  40. __declspec(dllexport) const TCHAR *LibDescription()
  41. {
  42. return _T("Naruto 3D import plugin");
  43. }
  44. __declspec(dllexport) ULONG LibVersion()
  45. {
  46. return VERSION_3DSMAX;
  47. }