http://cafe.naver.com/digitaldream/2309 와 introduction to the maya API 강좌 참조
MayaPluginWizard 적용하기 ///////////////////////////////////////////////////
그냥 digitaldream카페글을 보고 막연히 Visual Sudio 2008을 깔아서 적용했는데
MayaPluginWizard 를 실행해도 프로젝트를 만들 수 없다며 에러가 뜨고 아무 반응이 없다.
몇시간동안 삽질하다
마야의 MayaPluginWizard가 있던 폴더의 readme파일을 읽어보니 Maya2014는
Visual Sudio 2010이 기본인거 같다
1. 인스톨할때 custom으로 64bit C++ Complier를 체크할 것( Visual Sudio 2010는 체크되어 있다 )
2. programFiles 폴더에 Maya설치폴더\devkit\pluginwizard 에 있는 압축파일을 풀고
그안에
MayaPluginWizard.vsdir
MayaPluginWizard.vsz
MayaPluginWizard.ico
세 파일을
programFiles(x86) 폴더에 Visual Sudio 10.0\VC\vcprojects 에 복사한다
3. 나머지 MayapluginWizard 폴더는
programFiles(x86) 폴더에 Visual Sudio 10.0\VC\VCWizards 에 복사한다
\VC\VCWizards\MayapluginWizard\MayapluginWizard 요런 경로가 맞는거 같다
4. 이제야 작동하네,,
그냥 바로 쌩코딩일 경우 ///////////////////////////////////////////////////
1. 새 프로젝트에서 Win32 Project로 프로젝트 이름정하고
2. application type 은 dll으로 additional options 는 empty preject
3. 프로젝트 생성되면 솔루션 탐색기에서 프로젝트 선택해서 우클릭 / 설정
4. 젤 위 configuration을 all configuration으로 왼쪽 메뉴에서 linker/general 으로 가서
ouput file끝에 확장자를 dll --> mll으로 바꾼다
5. 내가 깐 한글판은 ( 영문으로 다시 깔든가 해야지 )
확장자 없이 $(Outdir)$(Targetname)$(TargetExt)으로만 되어 있는데
그냥 우선 강좌처럼
$(Outdir)\$(ProjectName).mll 으로 바꿔놨다
6. 마야/devkit/plug-ins/helloWorldCmd/helloWorldCmd.cpp 을 복사해다가
VS 현재 프로젝트 폴더에 복사해 놓고
솔루션 탐색기 / source 우클릭 가져오기로 helloWorldCmd.cpp를 가져온 후
다시 프로젝트 선택해서 우클릭 설정 all configuration설정으로 가면 아까는 없던 C/C++ 탭이 생겨있다
Additional Include Directory 에 마야 설치 폴더의 include 경로를 복사해 넣는다.
7. C/C++ / preprocessor /preprocessor definitions 에다가는
WIN32;NDEBUG;_WINDOWS;NT_PLUGIN;REQUIRE_IOSTREAM을 써넣음
8. linker 탭의 additional library directories 에는마야설치폴더의 lib 폴더 경로를 써넣음
9. linker 탭의 input/additional library dependencies에는
Foundation.lib OpenMaya.lib OpenMayaUI.lib OpenMayaAnim.lib OpenMayaFX.lib OpenMayaRender.lib Image.lib
opengl32.lib glu32.lib 를 써넣는다
9. linker 탭의 Command line / additional options에
/export:initializePlugin /export:uninitializePlugin을 써넣음
10. 젤 위 오른쪽 active solution platform 의 Win32 에서 new 해서 새로운 목록을 만들고
type or select the new platform 에서 x64를 선택