https://marketplace.visualstudio.com/items?itemName=GuyMicciche.MayaPluginWizard
A Visual Studio extension that provides project templates and wizards for creating Autodesk Maya C++ plugins. This extension streamlines the process of setting up Maya plugin development environments with proper project structure and dependencies.
- Project Templates: Pre-configured project templates for Maya C++ plugin development
- Wizard Integration: Custom wizard implementation that guides users through plugin creation
- Maya Integration: Automatically configures Maya SDK references and build settings
- Visual Studio Support: Compatible with Visual Studio 2022/2019/2017
Maya 2026/2025/2024/2023/2022/2020/2019
- Visual Studio 2017 or later
- Autodesk Maya 2019 or later
- Maya DevKit installed (for more control)
- .NET Framework 4.7.2 or later
- Python 3.9 or later (to run
unload_plugin.pyandload_plugin.pywhen you build)
- Download the latest VSIX package from the Releases page
- Double-click the
.vsixfile to install the extension - Restart Visual Studio
- The Maya plugin templates will appear under Visual C++ templates
- Open Visual Studio
- Go to File > New > Project... (Crtl+Shift+N)
- Navigate to Visual C++ > Maya templates
- Select the desired Maya plugin template
- Configure your project name and location
- Follow the wizard prompts to configure Maya-specific settings
- Set
MAYA_LOCATIONvariable in System Properties > Environment Variables... > System variables (ex.C:\Program Files\Autodesk\Maya2026
The wizard creates a properly structured Maya plugin project with:
YourPluginName/
├── Source Files/
│ ├── pluginMain.cpp
│ └── YourPlugin.cpp
├── Header Files/
│ └── YourPlugin.h
├── Resource Files/
└── packages.config
This extension uses the following NuGet packages:
Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime(v17.14.40254)Microsoft.VisualStudio.Interop(v17.14.40260)
- Clone this repository
- Open the solution in Visual Studio 2022/2019/2017
- Restore NuGet packages
- To change version number, open
MayaPluginWizard.csprojand change the PropertyGroupVsixVersion - Project templates are automatically compressed into
.zipfiles on build, and saved to MayaPluginWizard/ProjectTemplates/Maya directory - To add more project templates, , put them into the ProjectTemplates/Maya folder and add them in the
source.extension.vsixmanifestunder Assets - Build the Project by selecting the
MayaPluginWizardproject in the Solution Explorer (Ctrl+B) - Press F5 to run in experimental instance for debugging
- WizardImplementation.cs: Core wizard logic implementing
IWizardinterface - index.html: Extension documentation and help content
- stylesheet.css: Styling for help content
- packages.config: NuGet package dependencies
- ProjectTemplates/Maya folder contains the
.zipfiles that will be included in the build.
Once you've created a project using this wizard, you can:
-
Setup System variables System Properties > Environment Variables... > System variables
- MAYA_LOCATION
- MAYA_PLUG_IN_PATH
-
Create or modify
userSetup.pyto include (or run this maya_commandport_setup.bat:
# userSetup.py
import maya.cmds as cmds
cmds.commandPort(name=":20200", sourceType="mel")
cmds.commandPort(name=":20201", sourceType="python")- Implement your plugin functionality in the generated source files
- Add Qt libs to Project > Properties > Linker > Input > Additional Dependencies if you are using Qt (ex: Qt6Core.lib;Qt6Gui.lib;Qt6Widgets.lib)
- Build the project (Ctrl+B) to create a
.mllfile- If you have Maya open,
unload_plugin.pyandload_plugin.pyshould create a new file, unload the plugin, and the reload it - Modify
unload_plugin.pyif you don't want to create a new file
- If you have Maya open,
- The
.mllfile should get copied toMAYA_PLUG_IN_PATHif you set it up correctly. Otherwise, manually copy the.mllfile to%USERPROFILE%\Documents\maya\2025\plug-insfolder - Load the plugin in Maya using the Plug-in Manager
- Test your plugin functionality
The generated projects include:
- Proper Maya SDK include paths
- Maya library dependencies
- Plugin entry point functions
- Basic plugin structure following Maya conventions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
These steps are only necessary if you plan on using the Qt Visual Studio Tools in Visual Studio:
- Note Qt version for your Maya version:
- Maya 2026/2025: Qt 6.5.3 (Qt comes in the Maya API SDK's and tools)
- Maya 2024/2023/2022: Qt 5.15.2 (Qt in Maya directory)
- Maya 2020/2019: Qt 5.12.5 (Qt in Maya directory)
- Install the Qt Visual Studio Tools Visual Studio extension by going to Extensions > Manage Extensions...
- Go to Extensions > Qt VS Tools > Qt Versions and choose the
Locationwhereqmake.exeandqtpaths.exeare- For Maya 2025+ look in the
devkitBase/Qt/binfolder, you might have to extractQt.zipto yourdevkitBasedirectory - For Maya 2024 and below, look in
C:\Program Files\Autodesk\Maya2024\binfolder, should have both files there
- For Maya 2025+ look in the
- If using the devkit (Maya 2025+), download it from The Maya Developer Center and extract somewhere on your disk.
- If installing Qt (Maya 2024 and lower), see Installing Qt
- Right-click on your C++ project, click Qt > Convert to Qt/MSBuild project
- Now every time you compile your project Qt will handle all the Qt specific files automatically (ex: Resources.qrc, converting to moc files, etc.)
- Download Qt for open source use
- You will need to create an account.
- In the installer when you reach Customize, click Show > Archive and dropdown to Qt > Qt 5.15.2 and check MSVC 2019 64-bit (don't check the entire Qt folder. In addition, you should also check CMake, under Qt > Build Tools > CMake if you don't already have it. Feel free to install Qt 6.5.3 if you want to use this installer for Maya 2025+.
- Preferred location is C:\Qt
5. Click Next, Next, Next, then click Install
It is recommended to have the basic Qt build on your machine if you want to use the Qt Visual Studio Tools extension and for Visual Studio to compile .moc files and Qt Resources.qrc. You will also need Git and Perl to build to run the commands or batch scripts provided below. However if for some reason you want to build a more complete build, you will need to add the .exe files from Step 4 and edit the batch files to uncomment the Advanced init-repository command.
- Git Bash
- Strawberry Perl, add
.exeto PATH - Ninja, add
.exeto PATH (to build Qt 6+ with cmake) - If building QtWebEngine, you will also need to add these
.exeto PATH:
build_qt_6_5_3_for_maya_2026_2025.bat
build_qt_5.15.2_for_maya_2024_2023_2022.bat
build_qt_5_12_5_for_maya_2020_2019.bat
Visual Studio 2022
Set in System Properties > Environment Variable... > System variables:
- $(MAYA_LOCATION) : Your Maya installation directory
- $(MAYA_PLUG_IN_PATH) : Your Maya plug-ins directory
- Configuration Properties -> General -> General Properties -> Output Directory ->
$(Configuration)\ - Configuration Properties -> General -> General Properties -> Intermediate Directory ->
$(Configuration)\ - Configuration Properties -> General -> General Properties -> Configuration Type ->
Dynamic Library (.dll) - Configuration Properties -> General -> General Properties -> C++ Language Standard ->
ISO C++17 Standard (/std:c++17)
- Configuration Properties -> Advanced -> Advanced Properties -> Target File Extension ->
.mll
- Configuration Properties -> C/C++ -> General -> Additional Include Directories -> %(MAYA_LOCATION)\include
- Configuration Properties -> C/C++ -> General -> Debug Information Format -> ProgramDatabase (/Zi)
- Configuration Properties -> C/C++ -> General -> Warning Level -> Level3 (/W3)
- Configuration Properties -> C/C++ -> General -> Multi-processor Compilation -> Yes (/MP)
- Configuration Properties -> Linker -> General -> Additional Library Directories -> $(MAYA_LOCATION)\lib
- Configuration Properties -> Linker -> Input -> Additional Dependencies -> (Fill below)
Foundation.lib
OpenMaya.lib
OpenMayaAnim.lib (optional)
OpenMayaFX.lib (optional)
OpenMayaRender.lib (optional)
OpenMayaUI.lib (optional)
- Configuration Properties -> Linker -> Command Line -> Additional Options ->
/export:initializePlugin /export:uninitializePlugin
Make sure unload_plugin.py and load_plugin.py are in your project directory, with Python installed (not from the Windows Store)
- Configuration Properties -> Build Events -> Pre-Build Event ->
python $(ProjectDir)unload_plugin.py" - Configuration Properties -> Build Events -> Post-Build Event ->
copy $(TargetPath) "$(MAYA_PLUG_IN_PATH)\$(TargetName)$(TargetExt)" /b /y python $(ProjectDir)load_plugin.py
- Configuration Properties -> Advanced -> Advanced Properties -> Use Debug Libraries ->
Yes
- Configuration Properties -> C/C++ -> Optimization -> Optimization -> Maximum Optimization (Favor Speed) (/O2)
- Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions -> (Fill below)
NDEBUG
WIN32
_WINDOWS
_USRDLL
NT_PLUGIN
_HAS_ITERATOR_DEBUGGING=0
_SECURE_SCL=0
_SECURE_SCL_THROWS=0
_SECURE_SCL_DEPRECATE=0
_CRT_SECURE_NO_DEPRECATE
TBB_USE_DEBUG=0
__TBB_LIB_NAME=tbb.lib
REQUIRE_IOSTREAM
AW_NEW_IOSTREAMS
Bits64_
- Configuration Properties -> Advanced -> Advanced Properties -> Use Debug Libraries ->
No
- Configuration Properties -> C/C++ -> Optimization -> Optimization -> Disabled (/Od)
- Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions -> (Fill below)
_DEBUG
WIN32
_WINDOWS
_USRDLL
NT_PLUGIN
_HAS_ITERATOR_DEBUGGING=0
_SECURE_SCL=0
_SECURE_SCL_THROWS=0
_SECURE_SCL_DEPRECATE=0
_CRT_SECURE_NO_DEPRECATE
TBB_USE_DEBUG=0
__TBB_LIB_NAME=tbb.lib
REQUIRE_IOSTREAM
AW_NEW_IOSTREAMS
Bits64_
NOTE: Qt Visual Studio Tools will do all of the following by default if you convert your project into a Qt project.
- If your project
.hfiles has a Q_OBJECT in it, then a corresponding moc.cppfile will need to be generated. Right-click your.hfile with Q_OBJECT and select Properties. Go to Configuration Properties -> General -> Item Type and set it toCustom Build Tool. Click Apply. Then go to Custom Build Tool -> General and enter the following:- Command Line:
"$(MAYA_LOCATION)\bin\moc.exe" "%(FullPath)" -o "$(ProjectDir)moc_%(Filename).cpp" - Description:
Running moc on "%(FullPath)" - Outputs:
$(ProjectDir)moc_%(Filename).cpp
- Command Line:
- If your project has a
Resources.qrcin it, then a corresponding moc.cppfile will need to be generated. Right-click your.qrcfile and select Properties. Go to Configuration Properties -> General -> Item Type and set it toCustom Build Tool. Click Apply. Then go to Custom Build Tool -> General and enter the following:- Command Line:
"$(MAYA_LOCATION)\bin\rcc.exe" -name resources "%(FullPath)" -o "%(Filename).qrc.cpp" - Description:
Converting resource "%(FullPath)" - Outputs:
%(Filename).qrc.cpp
- Command Line:
- After the first build, you will need to import all the generated
.cppfiles once. It will always get updated on each build. Again, this is not necessary if you are using the Qt Visual Studio Tools extension for Visual Studio
| Module | Provides Include Directories |
|---|---|
| qtbase | QtCore, QtGui, QtWidgets, QtNetwork, QtSql, QtTest, QtConcurrent, QtOpenGL, QtOpenGLWidgets, QtPrintSupport, QtXml, QtDBus, QtDeviceDiscoverySupport, QtFbSupport, QtFreetype, QtHarfbuzz, QtJpeg, QtPng, QtZlib |
| qtdeclarative | QtQml, QtQmlCore, QtQmlModels, QtQmlWorkerScript, QtQmlLocalStorage, QtQmlXmlListModel, QtQmlIntegration, QtQmlCompiler, QtQmlTypeRegistrar, QtQmlDom, QtQmlDebug, QtQuick, QtQuickWidgets, QtQuickTest, QtQuickControls2, QtQuickControls2Impl, QtQuickTemplates2, QtQuickLayouts, QtQuickParticles, QtQuickShapes, QtQuickEffects, QtQuickDialogs2, QtQuickDialogs2QuickImpl, QtQuickDialogs2Utils, QtQuickTestUtils, QtQuickControlsTestUtils, QtPacketProtocol, QtLabsAnimation, QtLabsFolderListModel, QtLabsQmlModels, QtLabsSettings, QtLabsSharedImage, QtLabsWavefrontMesh, QtExampleIcons |
| qtmultimedia | QtMultimedia, QtMultimediaWidgets, QtMultimediaQuick, QtSpatialAudio |
| qttools | QtDesigner, QtDesignerComponents, QtHelp, QtUiTools, QtUiPlugin, QtTools |
| qtpositioning | QtPositioning, QtPositioningQuick |
| qtserialport | QtSerialPort |
| qtserialbus | QtSerialBus |
| qtsensors | QtSensors, QtSensorsQuick |
| qtwebsockets | QtWebSockets |
| qtwebchannel | QtWebChannel |
| qtwebengine | QtWebEngineCore, QtWebEngineWidgets, QtWebEngineQuick, QtPdf, QtPdfQuick, QtPdfWidgets, QtWebView, QtWebViewQuick |
| qtremoteobjects | QtRemoteObjects, QtRemoteObjectsQml, QtRepParser |
| qtscxml | QtScxml, QtScxmlQml, QtStateMachine, QtStateMachineQml |
| qtspeech | QtTextToSpeech |
| qt3d | Qt3DCore, Qt3DRender, Qt3DInput, Qt3DLogic, Qt3DAnimation, Qt3DExtras, Qt3DQuick, Qt3DQuickAnimation, Qt3DQuickExtras, Qt3DQuickInput, Qt3DQuickRender, Qt3DQuickScene2D |
| qtshadertools | QtShaderTools |
| qtsvg | QtSvg, QtSvgWidgets |
| qt5compat | QtCore5Compat |
| Module | Provides Include Directories |
|---|---|
| qtbase | QtCore, QtGui, QtWidgets, QtNetwork, QtSql, QtTest, QtConcurrent, QtOpenGL, QtOpenGLExtensions, QtPrintSupport, QtXml, QtDBus, QtPlatformHeaders, QtAccessibilitySupport, QtThemeSupport, QtFontDatabaseSupport, QtDeviceDiscoverySupport, QtEdidSupport, QtEventDispatcherSupport, QtFbSupport, QtPlatformCompositorSupport, QtWindowsUIAutomationSupport, QtWinExtras, QtZlib |
| qtsvg | QtSvg |
| qtmultimedia | QtMultimedia, QtMultimediaWidgets, QtMultimediaQuick |
| qttools | QtDesigner, QtDesignerComponents, QtHelp, QtUiTools, QtUiPlugin |
| qtserialport | QtSerialPort |
| qtserialbus | QtSerialBus |
| qtsensors | QtSensors |
| qtwebsockets | QtWebSockets |
| qtwebchannel | QtWebChannel |
| qtwebengine | QtWebEngine, QtWebEngineCore, QtWebEngineWidgets, QtPdf, QtPdfWidgets |
| qtxmlpatterns | QtXmlPatterns |
| qtnetworkauth | (OAuth support) |
| qtremoteobjects | QtRemoteObjects, QtRepParser |
| qtscxml | QtScxml |
| qtspeech | QtTextToSpeech |
| qtactiveqt | ActiveQt (Windows only) |
| qt3d | Qt3DCore, Qt3DRender, Qt3DInput, Qt3DLogic, Qt3DAnimation, Qt3DExtras, Qt3DQuick, Qt3DQuickAnimation, Qt3DQuickExtras, Qt3DQuickInput, Qt3DQuickRender, Qt3DQuickScene2D |
| qtgamepad | QtGamepad |
| qtlocation | QtLocation, QtPositioning, QtPositioningQuick |
| qtdeclarative | QtQml, QtQmlModels, QtQmlWorkerScript, QtQuick, QtQuickWidgets, QtQuickTest, QtQuickParticles, QtQuickShapes, QtPacketProtocol, QtQmlDebug |
| qtquickcontrols2 | QtQuickControls2, QtQuickTemplates2 |
| qtwebview | QtWebView |
