annaleah
09-12-2005, 05:39 AM
Hi...its me still messing around with the main menu....
I had this in the main menu without the scripting.I had a simple menu item like first and had it attached to the main menu which is great...now when I put this script in my script folder and userset up as Create2; it first doesnt allow anything else to load and second gives me an error when i source it from inside maya....Somewhere at the end of the script there is a mistake and im thinking it has to do with me not knowing how to make the menu item select and complete the torus part of the script..
Can anyone spot whats going on?
global proc create2;()
{
source Create2;
global string $gMainWindow;
setParent $gMainWindow;
menu -l "Create2"
-p MayaWindow
-to 1
-aob true
create2Menu;
menuItem -l "Create2-Primative"
-ann "PolyTorus"
-echoCommand true
-c "polyTorus"
polyTorusItem;
}
global proc polyTorus;()
{
polyTorus -r 1 -sr 0.5 -tw 225 -sx 4 -sy 4 -ax 0 0 1 -tx 1 -ch 1;
rotate 0 0 45;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;
}
I had this in the main menu without the scripting.I had a simple menu item like first and had it attached to the main menu which is great...now when I put this script in my script folder and userset up as Create2; it first doesnt allow anything else to load and second gives me an error when i source it from inside maya....Somewhere at the end of the script there is a mistake and im thinking it has to do with me not knowing how to make the menu item select and complete the torus part of the script..
Can anyone spot whats going on?
global proc create2;()
{
source Create2;
global string $gMainWindow;
setParent $gMainWindow;
menu -l "Create2"
-p MayaWindow
-to 1
-aob true
create2Menu;
menuItem -l "Create2-Primative"
-ann "PolyTorus"
-echoCommand true
-c "polyTorus"
polyTorusItem;
}
global proc polyTorus;()
{
polyTorus -r 1 -sr 0.5 -tw 225 -sx 4 -sy 4 -ax 0 0 1 -tx 1 -ch 1;
rotate 0 0 45;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;
}
