//+ // ============================================================================ // Copyright (C) Alias Systems Corp., and/or its licensors ("Alias"). // All rights reserved. These coded instructions, statements, computer // programs, and/or related material (collectively, the "Material") // contain unpublished information proprietary to Alias, which is // protected by Canadian and US federal copyright law and by international // treaties. This Material may not be disclosed to third parties, or be copied // or duplicated, in whole or in part, without the prior written consent of // Alias. ALIAS HEREBY DISCLAIMS ALL WARRANTIES RELATING TO THE MATERIAL, // INCLUDING, WITHOUT LIMITATION, ANY AND ALL EXPRESS OR IMPLIED WARRANTIES OF // NON-INFRINGEMENT, MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. // IN NO EVENT SHALL ALIAS BE LIABLE FOR ANY DAMAGES WHATSOEVER, WHETHER DIRECT, // INDIRECT, SPECIAL, OR PUNITIVE, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE // OR OTHER TORTIOUS ACTION, OR IN EQUITY, ARISING OUT OF OR RELATED TO THE // ACCESS TO, USE OF, OR RELIANCE UPON THE MATERIAL. // ============================================================================ //- //////////////////////////////////////////////////////////////////////// // // meshReorderPlugin.cc // // Description: // Tool for reindexing meshes based on user defined starting faces // // This plug-in will register the following two commands in Maya: // meshReorder // meshRemap // //////////////////////////////////////////////////////////////////////// #include "meshReorderCmd.h" #include "meshReorderTool.h" #include "meshRemapCmd.h" #include "meshRemapTool.h" #include // INITIALIZES THE PLUGIN BY REGISTERING THE COMMAND AND NODE: MStatus initializePlugin(MObject obj) { MStatus status; MFnPlugin plugin(obj, "Alias|Wavefront Support", "4.0", "Any"); // Set editing tools/contexts status = plugin.registerContextCommand( "meshReorderContext", meshReorderContextCmd::creator, "meshReorder", meshReorderCommand::creator ); if (!status) { status.perror("registerContextCommand"); return status; } status = plugin.registerContextCommand( "meshRemapContext", meshRemapContextCmd::creator, "meshRemap", meshRemapCommand::creator ); if (!status) { status.perror("registerContextCommand"); return status; } return status; } // UNINITIALIZES THE PLUGIN BY DEREGISTERING THE COMMAND AND NODE: MStatus uninitializePlugin(MObject obj) { MStatus status; MFnPlugin plugin(obj); status = plugin.deregisterContextCommand( "meshReorderContext", "meshReorder" ); if (!status) { status.perror("deregisterContextCommand"); return status; } status = plugin.deregisterContextCommand( "meshRemapContext", "meshRemap" ); if (!status) { status.perror("deregisterContextCommand"); return status; } return status; }