View Full Version : Maya API: Maya Plugin Wizard in Visual Studio 2005
Stucky 06-20-2006, 09:50 AM Hello guys. The Maya Plugin Wizard that comes with Maya 7.0 does not work Microsoft Visual Studio 2005. I've searched the net and I found in Highend3d.com an update by Thomas Goddard to this plugin that works with Visual Studio 2005. You can download it here (http://www.highend3d.com/maya/downloads/plugins/utility_external/misc/4139.html).
The problem is I can't get it to work. I do the same thing as I do when I install the Maya Plugin Wizard in Microsoft Visual Studio 2003. I only tried Microsoft Visual C++ 2005 Express because it is free, otherwise I can stick with 2003 version. Did anyone already try this? Perhaps it only works with the version 2005 Pro?!?!?
Thanks in advance
-S
|
|
Robert Bateman
06-20-2006, 02:15 PM
you don't really need the wizard. I personally never use it.
1. create a dll project
2. change the extension to mll
3. change project settings->C/C++->Code generation to Multi-threaded or Multi-threaded-debug
4. add NT_PLUGIN to the C/C++ -> pre-processor defines in the project settings
5. set the library and include paths to the maya API (additional include directories, and additional lib directories)
6. in your main plug-in file, do :
#include <maya/MFnPlugin.h>
// link libs under VisualC++/Win32
#ifdef WIN32
#pragma comment(lib,"Foundation.lib")
#pragma comment(lib,"OpenMaya.lib")
#pragma comment(lib,"OpenMayaFx.lib")
#pragma comment(lib,"OpenMayaUi.lib")
#pragma comment(lib,"Image.lib")
#pragma comment(lib,"OpenMayaAnim.lib")
#pragma comment(lib,"OpenGl32.lib")
#pragma comment(lib,"glu32.lib")
#endif
#ifdef WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
EXPORT MStatus initializePlugin( MObject obj )
{
MFnPlugin plugin( obj, "Rob Bateman", "1.0", "Any");
// do stuff
return status;
}
EXPORT MStatus uninitializePlugin( MObject obj)
{
MFnPlugin plugin( obj );
// do stuff
return MS::kSuccess;
}
Stucky
06-20-2006, 03:05 PM
Thanks a lot Robert. I was wondering if there was a way to do that without really using the Maya Plugin Wizard. I will try that as soon as I can, and I'll post ,y advance...Thanks a million dude. You rule.
-S
CGTalk Moderation
06-20-2006, 03:05 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.