All of the api (OpenMaya) work I do is via the Python bindings. And plugins authored that way don't need to be 'compiled', since they're considered 'scripted plugins'. Sometimes however I'll run into legacy plugins that need recompiled to the latest version of Maya, and Maya itself comes with many examples of c++ authored plugins that do need compiled (living here:
Talking with co-workers smarter than I on the subject, here are the steps we went through to compile a plugin:
Questions:
OR
Here's a video tutorial by Chad Vernon on how to do it using CMake, for Mac & Linux support.
http://www.chadvernon.com/blog/maya/compiling-maya-plug-ins-with-cmake/
C:\Program Files\Autodesk\Maya20XX\devkit\plug-ins
).Talking with co-workers smarter than I on the subject, here are the steps we went through to compile a plugin:
- Install Visual Studio.
- The version of Visual Studio is very important, based on which Maya you are going to compile for. Check out this subject to understand which version you need installed: Maya compiler versions
- When you first launch Visual Studio, configure it to 'C++'.
- Launch Visual Studio and: File -> Open
C:\path\to\my\plugin\myPlugin.sln
..sln
are Visual Studio 'solution' files.
- Select the 'Release' build configuration, from the drop-down in the 'standard toolbar'.
- Press F7 to build the plug-in (Build -> Build Solution): Watch the magic happen in the Output window.
- The newly compiled plugin is output to
C:\path\to\my\plugin\myPlugin.mll
Questions:
- Can you use Visual Studio Express?
- Looks like there is evidence on the web that this is possible.
- Can you use other compliers other than Visual Studio?
- I've read of Codeblocks, Xcode, and possibly even Eclipse working.
OR
Here's a video tutorial by Chad Vernon on how to do it using CMake, for Mac & Linux support.
http://www.chadvernon.com/blog/maya/compiling-maya-plug-ins-with-cmake/