MEL - Command error

polycounter lvl 3
Offline / Send Message
Pinned
jayantbhatt007 polycounter lvl 3
Hi I'm working on a small script so I could  increase my workflow. Whole script is working but that last procedure bevel command  is not working properly  can you tell me how to fix it?  ( polyBevel -fraction 0.2 -chamfer 0; ) Here I'm using fraction value 0.2  and chamfer is 0 but when I run the script it is using the maya default polybevel values i.e. fraction value 0.5  and chamfer is 1.

SEE THE WHOLE SCRIPT

 {
// create a window
window -title "Nut" -menuBar true -w 220 -h 200 "";
// define the layout of controls added 
// to the window.
columnLayout;
// create a collapsible frame layout
    frameLayout -collapsable true -label "Nuts";
   
    // add the other controls
    flowLayout -columnSpacing 1 -w 220 -h 30;
   
        // create six symbol buttons with related mel command
   
    symbolButton -image "commandButton.png" -command "HardEdges";

   
   


proc HardEdges()
{
   polySelectConstraint -m 3 -t 0x8000 -sm 1;
polySelectConstraint -m 0 -t 0x8000 -sm 0;
BevelPolygon;
performBevelOrChamfer;
polyBevel -fraction 0.2 -chamfer 0;

}

    setParent ..;
// show the window we last created
showWindow;\
  }

Replies

  • jayantbhatt007
    Offline / Send Message
    jayantbhatt007 polycounter lvl 3
    // create a window
    window -title "Nut" -menuBar true -w 220 -h 200 "";
    // define the layout of controls added 
    // to the window.
    columnLayout;
    // create a collapsible frame layout
        frameLayout -collapsable true -label "Nuts";
       
        // add the other controls
        flowLayout -columnSpacing 1 -w 220 -h 30;
       
            // create six symbol buttons with related mel command
       
        symbolButton -image "commandButton.png" -command "HardEdges";

           setParent ..;
    // show the window we last created
    showWindow;
       
    proc HardEdges()
    {
       polySelectConstraint -m 3 -t 0x8000 -sm 1;
    polySelectConstraint -m 0 -t 0x8000 -sm 0;
    polyBevel3 -fraction 0.125 -offsetAsFraction 1 -autoFit 1 -chamfer 0 -segments 1 -worldSpace 1;
    }

  • jayantbhatt007
    Offline / Send Message
    jayantbhatt007 polycounter lvl 3
    // create a window
    window -title "Nut" -menuBar true -w 220 -h 200 "";
    // define the layout of controls added 
    // to the window.
    columnLayout;
    // create a collapsible frame layout
        frameLayout -collapsable true -label "Nuts";
       
        // add the other controls
        flowLayout -columnSpacing 1 -w 220 -h 30;
       
            // create six symbol buttons with related mel command
       
        symbolButton -image "commandButton.png" -command "HardEdges";

           setParent ..;
    // show the window we last created
    showWindow;
       
    proc HardEdges()
    {
       polySelectConstraint -m 3 -t 0x8000 -sm 1;
    polySelectConstraint -m 0 -t 0x8000 -sm 0;
    polyBevel3 -fraction 0.1 -offsetAsFraction 1 -autoFit 1 -depth 1 -mitering 0 -miterAlong 0 -chamfer 0 -segments 2 -worldSpace 1 -smoothingAngle 30 -subdivideNgons 1 -mergeVertices 1 -mergeVertexTolerance 0.0001 -miteringAngle 180 -angleTolerance 180;
    BevelPolygon;
    performBevelOrChamfer;
    }
Sign In or Register to comment.