top of page
Search

Maya Qt for Visual Studio

  • Writer: Navyata Bawa
    Navyata Bawa
  • Jul 20, 2017
  • 2 min read

We will be requiring MS Visual Studio 2017 and Maya 2017 for this setup.

Step 1:

Install Autodesk Maya 2017

Step 2:

Get the Maya developer kit

Step 3:

Copy the \devkit, \include, and \mkspecs folders into C:\Program Files\Autodesk\maya2017

Step 4:

Point MAYA_LOCATION environment variable to your Maya installation (C:\Program Files\Autodesk\maya2017)

Step 5:

Install QT Tools for Visual studio. http://download.qt.io/development_releases/vsaddin/

This will add a Qt VS Tools icon on Visual Studio.

Under this icon, go to Qt options and select the Qt version you are using and set it to default.

Step 6:

Settings to change for Visual Studio:

  • Go to your project settings (Alt+F7)

  • Go to General under configuration properties. Set the Target Extension to .mll and Configuration Type to Dynamic Library(.dll) as shown below:

  • Go to General under C/C++. Add the additional include libraries (if any).

  • Go to Precompiled Headers under C/C++ and set the precompiled Header to Not using precompiled headers and set Enable Run-time information to YES. Add these preprocessor definitions: NT_PLUGIN;REQUIRE_IOSTREAM

  • Go to Linker settings. Under the General settings, add the MAYA_LOCATION to Additional Library Directories as shown below. This allows Visual Studio to find the correct libraries at the time of linking. Also, under command line additional options, add /export:initializePlugin /export:uninitializePlugin.

Under Input settings, add the required libraries under Additional Dependencies. This is what it looks like:

  • Build the Qt project using Build option. It will save the .mll file in the debug/release folder. Use this .mll file to load it onto Maya and run it.

Step 7:

Open Maya 2017. Go to Windows and then plug-in as shown.

Load your plug-in by browsing it from the file path. Type the MEL command corresponding to it. You will see the output. This helix example is from the Maya Help docs as an example.

 
 
 

Comments


  • Twitter
  • Facebook Social Icon
  • LinkedIn Social Icon
  • YouTube Social  Icon
bottom of page