Home Technical Talk

Maya Flag error

polycounter lvl 8
Offline / Send Message
Pinned
jayantbhatt007 polycounter lvl 8
 Anyone can help me with this. The command  is giving me an error 

Error = ( // Error: line 15: Flags must come before objects: -ed )

textFieldButtonGrp  -buttonLabel "Browse" -tx $cfp -bc rsFileDialog rsTxtFld -ed true filepath;

Replies

  • jayantbhatt007
    Offline / Send Message
    jayantbhatt007 polycounter lvl 8
    //Code by rajasekaransurjen 


    {   string $sn = `file -q -sn`;
    string $cfp = `dirname( $sn )`;

    if (`window -exists ScreenCapture`) //closes window if already open
      deleteUI ScreenCapture;
      
    window -title "ScreenCapture" ScreenCapture; //creates window

                rowColumnLayout -numberOfColumns 4 -columnAttach 1 "left" 0
                -columnWidth 1 40 -columnWidth 50 500;
    text -label "Path";
    textFieldButtonGrp -buttonLabel "Browse" -tx $cfp -bc rsFileDialog -ed true filepath;
                button -w 60 -h 28 -label "Capture" -command "Capture";
                
                
           
           
              
            
    // show the window we last created
    showWindow;
      }
      
     proc rsFileDialog()

    {
        string $rsPath[] = `fileDialog2 -ds 1 -fm 3`;
        textFieldButtonGrp -e -tx $rsPath[0] rsTxtFld ;
      
      
    global proc Capture() 
    {
    string $path = `textField -q -tx filepath`;
    string $k =  ($path + "/snapshot");
    string $ff = ".png";

    string $node[] = `ls -sl`;
    {
    setAttr "defaultRenderGlobals.imageFormat" 8;
    playblast -st 1 -et 1 -v 0 -fmt "image" -qlt 100 -p 100 -w 2000 -h 2000 -f $k;
    }
    clear $node;
    }

Sign In or Register to comment.