Hi I was just messing with the Maya MEL script and somehow I created a small script for my workflow but there is one error. I don't to where to paste this line
if ( `window -exists nameWindow` ) {
deleteUI nameWindow;
}
HERE IS MY SCRIPT..........
// create a window with a menu bar
window -title "3DGhost" -menuBar true -w 220 -h 200;
// two frame layouts will be laid out in a columna
columnLayout;
// create a collapsible frame layout
frameLayout -collapsable true -label "Shapes";
{
// create a tearOff menu
menu -label "File" -tearOff true;
// add the menu items
menuItem -label "New" -command "NewScene";
menuItem -label "Open" -command "OpenScene";
menuItem -label "Save" -command "SaveScene";
menuItem -divider true -command "SaveScene";
menuItem -label "Quit" -command "quit";
// add a help menu
menu -label "Help" -helpMenu true;
menuItem -label "Help" -command "Help";
// add a help menu
menu -label "Credit" -helpMenu true;
menuItem -label "Jayant bhatt";
// add the other controls
flowLayout -columnSpacing 1 -w 220 -h 40;
// create three symbol buttons with related mel command
symbolButton -image "cube.xpm" -command "polyCube";
symbolButton -image "sphere.xpm" -command "CreatePolygonSphere";
symbolButton -image "plane.xpm" -command "CreatePolygonPlane";
symbolButton -image "cylinder.xpm" -command "CreatePolygonCylinder";
symbolButton -image "circle.xpm" -command "CreateNURBSCircle";
symbolButton -image "text.xpm" -command "CreatePolygonType";
setParent ..;
setParent ..;
// three frame layouts will be laid out in a column
columnLayout;
// create a collapsible frame layout
frameLayout -collapsable true -label "Options";
// define the layout of controls added
// to the window.
columnLayout;
// add the other controls
flowLayout -columnSpacing 1 -w 220 -h 40;
// create a couple of buttons
symbolButton -image "CenterPivot.png" -command "CenterPivot";
symbolButton -image "multiCut_NEX32.png" -command "dR_multiCutTool";
symbolButton -image "polyCircularize.png" -command "PolyCircularize";
symbolButton -image "detach.png" -command "DetachComponent";
symbolButton -w 35 -h 35 -image "addCreateGeneric_100.png" -command "CombinePolygons";
symbolButton -w 35 -h 35 -image "mergeConnections.png" -command "CombinePolygons";
setParent ..;
setParent ..;
setParent ..;
// create a collapsible frame layout
frameLayout -collapsable true -label "Constraint";
// add the other controls
flowLayout -columnSpacing 5 -w 220 -h 40;
symbolButton -w 30 -h 30 -image "edges_NEX.png" -command "toolPropertyShow";
symbolButton -w 30 -h 30 -image "hyper_s_ON.png" -command "manipMoveSetXformConstraint edge";
symbolButton -w 30 -h 30 -image "hyper_s_OFF.png" -command "manipMoveSetXformConstraint none";
setParent ..;
setParent ..;
setParent ..;
showWindow;
}
Replies