// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 17 June 2014 // // // Procedure Name: // ModelingGenerateMenu // // Description: // Create the MODELING->Generate menu // // Input Arguments: // Parent window that menu will be a part of. // // Return Value: // None. // global proc refreshModelingGenerateMenu() { if ( `pluginInfo -q -loaded xgenToolkit` ) { // XGen menuItems xgenAddMenuItems(); } else { if (`menuItem -q -exists "XGenEditorMenuItem"`) { xgenDeleteMenuItems(); } } } // initialize global variables used by paint effects source creatorGlobalVars; global proc ModelingGenerateMenu ( string $parent ) // // Description: // Modeling Generate menu // { setParent -m $parent; if( `menu -q -ni $parent` != 0 ) { // // Menu is built already - just refresh and return // refreshModelingGenerateMenu(); return; } // Prepare XGen menu items anchor as a placeholder. // If XGen plugin is loaded later we still have chance to insert the XGen related menu items. global string $gMainGenerateXGenAnchor = "mainGenerateXGenAnchor"; menuItem -divider true $gMainGenerateXGenAnchor; if(`isTrue MayaCreatorExists`) { // Paint Effects buildCreatorMenu($parent); } refreshModelingGenerateMenu(); }