博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Using qt to develop maya plugin on windows
阅读量:4040 次
发布时间:2019-05-24

本文共 1481 字,大约阅读时间需要 4 分钟。

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 = libTARGET = HelloCONFIG += console c++11CONFIG -= app_bundleCONFIG -= qtQMAKE_EXTENSION_SHLIB = mllQMAKE_LFLAGS	= /export:initializePlugin /export:uninitializePlugin /SUBSYSTEM:WINDOWS_CFLAGS		= /FD /GSQMAKE_CFLAGS	+= $${_CFLAGS}QMAKE_CXXFLAGS	+= $${_CFLAGS}SOURCES += \    main.cppDEFINES += WIN32 \           _WIN64 \           _WINDOWS \           _USRDLL \           NT_PLUGIN \           REQUIRE_IOSTREAM \           _BOOLINCLUDEPATH += $$(MAYA_PATH)/include \QMAKE_LIBDIR += $$(MAYA_PATH)/libLIBS += -lFoundation -lOpenMaya -lOpenMayaUI#OBJECTS_DIR = ""

5. create a c++ source file and write into it with following contents:

#include 
#include
#include
DeclareSimpleCommand( HelloMaya , "NCCA", "Maya 2016") //HelloMaya is the class nameMStatus HelloMaya::doIt( const MArgList& ){ std::cout<<"This should come from the shell\n"<
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.

你可能感兴趣的文章
logback高级特性使用(二) 自定义Pattern模板
查看>>
JVM并发机制探讨—内存模型、内存可见性和指令重排序
查看>>
可扩展、高可用服务网络设计方案
查看>>
如何构建高扩展性网站
查看>>
微服务架构的设计模式
查看>>
持续可用与CAP理论 – 一个系统开发者的观点
查看>>
nginx+tomcat+memcached (msm)实现 session同步复制
查看>>
c++字符数组和字符指针区别以及str***函数
查看>>
c++类的操作符重载注意事项
查看>>
c++模板与泛型编程
查看>>
WAV文件解析
查看>>
WPF中PATH使用AI导出SVG的方法
查看>>
WPF UI&控件免费开源库
查看>>
QT打开项目提示no valid settings file could be found
查看>>
Win10+VS+ESP32环境搭建
查看>>
Ubuntu+win10远程桌面
查看>>
flutter-实现圆角带边框的view(android无效)
查看>>
android 代码实现圆角
查看>>
flutter-解析json
查看>>
android中shader的使用
查看>>