摘要:本文将带你了解Maya动画制作之 Using qt to develop maya plugin on windows,希望本文对大家学Maya有所帮助
本文将带你了解Maya动画制作之 Using qt to develop maya plugin on windows,希望本文对大家学Maya有所帮助
1. download the maya develop kit
https://apps.autodesk.com/MAYA/en/Detail/Index?id=6303159649350432165&appLang=en&os=Win64
then extract to C:\Program Files\Autodesk\Maya2016
2. set environmental variable:
MAYA_PATH = c:\Program Files\Autodesk\Maya2016
add c:\Program Files\Autodesk\Maya2016\bin; to Path
3.new a plain C++ Application project
4.overwrite the .pro file as follows:
TEMPLATE = lib TARGET = Hello CONFIG += console c++11CONFIG -= app_bundleCONFIG -= qt QMAKE_EXTENSION_SHLIB = mll QMAKE_LFLAGS = /export:initializePlugin /export:uninitializePlugin /SUBSYSTEM:WINDOWS_CFLAGS = /FD /GSQMAKE_CFLAGS += $${_CFLAGS}QMAKE_CXXFLAGS += $${_CFLAGS} SOURCES += \ main.cpp DEFINES += WIN32 \ _WIN64 \ _WINDOWS \ _USRDLL \ NT_PLUGIN \ REQUIRE_IOSTREAM \ _BOOLINCLUDEPATH += $$(MAYA_PATH)/include \ QMAKE_LIBDIR += $$(MAYA_PATH)/lib LIBS += -lFoundation -lOpenMaya -lOpenMayaUI #OBJECTS_DIR = ""
5. create a c++ source file and write into it with following contents:
#include <maya/MSimple.h>#include <maya/MIOStream.h>#include <maya/MGlobal.h> DeclareSimpleCommand( HelloMaya , "NCCA", "Maya 2016") //HelloMaya is the class name MStatus HelloMaya::doIt( const MArgList& ){ std::cout<<"This should come from the shell\n"<<std::endl; MGlobal::displayInfo("Hello Maya in the maya command shell"); return MS::kSuccess;}
6. Now we can copy the Hello.mll to C:\Program Files\Autodesk\Maya2016\bin\plug-ins
7.open maya, type and execute HelloMaya in maya command shell
note: the command HelloMaya is the class name not the plugin's name.
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标常用软件之Maya频道!
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号