因为白话视频教程使用的那个模板有一段maya自带的代码,没有这段的的话影响学习,这里连注释都黏贴在这,复制到我们创建的pluginMain.CPP文件中 // // Copyright (C) MayaC++ // // File: pluginMain.cpp // // Author: Maya Plug-in Wizard 2.0 // #include <maya/MFnPlugin.h> MStatus initializePlugin( MObject obj ) // // Description: // this method is called when the plug-in is loaded into Maya. It // registers all of the services that this plug-in provides with // Maya. // // Arguments: // obj - a handle to the plug-in object (use MFnPlugin to access it) // { MStatus status; MFnPlugin plugin( obj, "MayaC++", "2018", "Any"); // Add plug-in feature registration here // return status; } MStatus uninitializePlugin( MObject obj ) // // Description: // this method is called when the plug-in is unloaded from Maya. It // deregisters all of the services that it was providing. // // Arguments: // obj - a handle to the plug-in object (use MFnPlugin to access it) // { MStatus status; MFnPlugin plugin( obj ); // Add plug-in feature deregistration here // return status; }