본문 바로가기

그래픽스 관련

[Maya] Setting up Visual Studio 2010 for Maya Plugin Development

자세한 내용은 이 링크를 참조: http://ivoxelstudios.com/blog/?p=46


The wizard is located at [ MayaInstallDir ] \ devkit \ pluginwizard \ MayaPluginWizard2.0.

Copy the following files located in the _MayaPluginWizard directory to  [ VisualStudioInstallDir ] \ Microsoft Visual Studio 10.0 \ VC \ vcprojects

  • MayaPluginWizard.vsdir
  • MayaPluginWizard.vsz
  • MayaPluginWizard.ico

Copy the MayaPluginWizard directory to the vcwizards folder. Restart Visual Studio and Maya Plugin Wizard should be available in the list of VC++ projects.

There are two things that you might want to check.

1. The version of VsWizard Engine. For Visual Studio 2010 it is 10.0. Look for this line wizard=VsWizard.VsWizardEngine.10.0 in MayaPluginWizard.vsz file located in _MayaPluginWizard directory. Change the version number to the visual studio version you are using.

2. Change “default.vcproj” to “default.vcxproj” in default.js located at Scripts folder. Don’t use this if visual studio version is 2005 or older[/box]

IF you are interested in setting it up manually, below are the steps:

STEP BY STEP PROCESS:

Below is the step by step procedure to manually setup the development environment using visual studio 2010. In project property settings:

Configuration

Configuration Properties -> Target Extension -> .mll
Configuration Type -> Dynamic Library (.dll)

C/C++
Preprocessor -> Preprocessor Definitions -> NT_PLUGIN
General -> Additional Include Directories -> [MayaInstallDir]\Include

Linker
General -> Additional Library Directories -> [MayaInstallDir]\lib
Input -> Additional Dependencies -> (You need to append Maya lib based on your plug-in)

  • Foundation.lib;
  • OpenMaya.lib;
  • OpenMayaUI.lib;
  • OpenMayaAnim.lib;
  • OpenMayaFX.lib;
  • OpenMayaRender.lib;
  • Image.lib;
  • opengl32.lib
64bit 플랫폼의 경우

매뉴얼에 따르면 x64로 전환만 해주면 된다고 했으나, 그 옵션을 잘 살펴보면 win32 만큼 잘 지정이 안되어있다.
그냥 그 configuration을 날려버리고 새로 x64 플랫폼을 위한 configuration을 만들면 그 때 win32로 부터 설정을 복사해올 수 있다.
그러면 끝.

추가사항

이미 잘돌아가는 플러그인 프로젝트의 속성으로 부터 c/c++ 과 Linker 섹션에 대한 command line 을 참조해볼 것.
win32의 경우 additional option 란에 다음과 같은 추가 옵션이 있었다.
 c/c++ 의 경우
/Gm /GR /GS /EHsc /Zi /I "." /D "WIN32" /D "_DEBUG" /RTC1 /c
Linker 의 경우
/subsystem:windows /dll /incremental:yes /debug /export:initializePlugin /export:uninitializePlugin