// Description: // // This is the template of any scripts you would like // to share with the community. Follow this simple structure // and you will have no problem to publish it. // //This is a global proc that must be declared in every script. //It allows you to place your menu item (if required) in the //proper sub-menu in the main NeoReel library menu. //This global procedure must be the name of this file followed by "Menu". // //Example: A script file for jiggle could be named nrJiggle.mel //Then the following proc should be named nrJiggleMenu() // global proc nrExampleMenu() { //Set the menu category. Choices are: global string $nrgUtilitiesMenu, $nrgModelingMenu, $nrgAnimationMenu, $nrgRiggingMenu, $nrgRenderingMenu, $nrgDynamicsMenu; //TODO: Put your menu creation code here (if any) //create your menu item, option boxes, sub-menues, etc. //The -parent flag uses one of the categories global variable declared above //The following menu item will be found under the Utilities section. //The command of the menu item can be what ever you want, in this case nrTestCommand. menuItem -l "Test Script" -c "evalEcho(\"nrTestCommand();\");" -ann "This is an example menu item" -parent $nrgUtilitiesMenu; } //This is the proc that is called from the above menu item //Make sure all global procedures and variables have unique names. //we recommend that you add a suffix, such as "nr" to minimize chances of name clashing. global proc nrTestCommand() { //TODO: Put your execution code here print "// Result: nrTestCommand was succesfully executed! //\n"; } //These braces declare a local space //They prevent working variables or procedures to be globally declared { //any initiallisation must be done here in local space //TODO: Put your initialisation code here (if any) //This is required if you added a menu in the NeoReel toolbox //It basically updates the toolbox menu and its categories if(`exists neoreelToolBox`) catch(`neoreelToolBox`); }