<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Maya Flag error in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9118856#M7106</link>
    <description>&lt;P&gt;Hi thank you so much for you help.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2019 06:11:08 GMT</pubDate>
    <dc:creator>jayantbhatt07</dc:creator>
    <dc:date>2019-10-31T06:11:08Z</dc:date>
    <item>
      <title>Maya Flag error</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9105720#M7101</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Anyone can help me with this. The command&amp;nbsp; is giving me an error&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error = (&amp;nbsp;// Error: line 15: Flags must come before objects: -ed )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;textFieldButtonGrp&amp;nbsp; -buttonLabel "Browse" -tx $cfp -bc rsFileDialog rsTxtFld -ed true filepath;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 11:17:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9105720#M7101</guid>
      <dc:creator>jayantbhatt07</dc:creator>
      <dc:date>2019-10-24T11:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Flag error</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9105974#M7102</link>
      <description>&lt;P&gt;textFieldButtonGrp -buttonLabel "Browse" -tx $cfp -bc rsFileDialog -ed true filepath;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 12:41:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9105974#M7102</guid>
      <dc:creator>rajasekaransurjen</dc:creator>
      <dc:date>2019-10-24T12:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Flag error</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9106049#M7103</link>
      <description>&lt;P&gt;//Code by rajasekaransurjen&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;{ string $sn = `file -q -sn`;&lt;BR /&gt;string $cfp = `dirname( $sn )`;&lt;/P&gt;&lt;P&gt;if (`window -exists ScreenCapture`) //closes window if already open&lt;BR /&gt;deleteUI ScreenCapture;&lt;BR /&gt;&lt;BR /&gt;window -title "ScreenCapture" ScreenCapture; //creates window&lt;/P&gt;&lt;P&gt;rowColumnLayout -numberOfColumns 4 -columnAttach 1 "left" 0&lt;BR /&gt;-columnWidth 1 40 -columnWidth 50 500;&lt;BR /&gt;text -label "Path";&lt;BR /&gt;textFieldButtonGrp -buttonLabel "Browse" -tx $cfp -bc rsFileDialog rsTxtFld -ed true filepath;&lt;BR /&gt;button -w 60 -h 28 -label "Capture" -command "Capture";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// show the window we last created&lt;BR /&gt;showWindow;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;proc rsFileDialog()&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;string $rsPath[] = `fileDialog2 -ds 1 -fm 3`;&lt;BR /&gt;textFieldButtonGrp -e -tx $rsPath[0] rsTxtFld ;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;global proc Capture()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;string $path = `textField -q -tx filepath`;&lt;BR /&gt;string $k = ($path + "/snapshot");&lt;BR /&gt;string $ff = ".png";&lt;/P&gt;&lt;P&gt;string $node[] = `ls -sl`;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;setAttr "defaultRenderGlobals.imageFormat" 8;&lt;BR /&gt;playblast -st 1 -et 1 -v 0 -fmt "image" -qlt 100 -p 100 -w 2000 -h 2000 -f $k;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;clear $node;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 13:07:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9106049#M7103</guid>
      <dc:creator>jayantbhatt07</dc:creator>
      <dc:date>2019-10-24T13:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Flag error</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9106054#M7104</link>
      <description>&lt;P&gt;When I added you line error was (&amp;nbsp;// Error: line 31: Object 'rsTxtFld' not found. )&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 13:08:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9106054#M7104</guid>
      <dc:creator>jayantbhatt07</dc:creator>
      <dc:date>2019-10-24T13:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Flag error</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9118443#M7105</link>
      <description>&lt;P&gt;Skimming this script, this line that was triggering your original problem:&lt;/P&gt;
&lt;PRE&gt;textFieldButtonGrp -buttonLabel "Browse" -tx $cfp -bc rsFileDialog &lt;STRONG&gt;rsTxtFld&lt;/STRONG&gt; -ed true filepath;&lt;/PRE&gt;
&lt;P&gt;Should probably be: (rsTxtFld moved to the end)&lt;/P&gt;
&lt;PRE&gt;textFieldButtonGrp -buttonLabel "Browse" -tx $cfp -bc rsFileDialog -ed true filepath &lt;STRONG&gt;rsTxtFld&lt;/STRONG&gt;;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error "Flags must come before objects" means that in the grammar of the command, "verb, adverbs, object", the final object you are operating on has to come last.&amp;nbsp; In this case, the command `textFieldButtonGrp` is creating the `rsTxtFld` object and assigning it that name.&amp;nbsp; &amp;nbsp;Everything in the middle is controlled by flags (-stuff -that -follows -dashes) or flag values (-this &lt;EM&gt;value&lt;/EM&gt; -that &lt;EM&gt;value&lt;/EM&gt; -the &lt;EM&gt;other value&lt;/EM&gt;).&amp;nbsp; The object needs to come last.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Later&amp;nbsp; in the script, that `rsTxtFld` object is being updated/edited, and if it is not named here, it will not be found.&amp;nbsp; (That creates the error in Message 4 in this thread).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 22:25:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9118443#M7105</guid>
      <dc:creator>tkaap2</dc:creator>
      <dc:date>2019-10-30T22:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Flag error</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9118856#M7106</link>
      <description>&lt;P&gt;Hi thank you so much for you help.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 06:11:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/9118856#M7106</guid>
      <dc:creator>jayantbhatt07</dc:creator>
      <dc:date>2019-10-31T06:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Flag error</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/13608722#M7107</link>
      <description>&lt;P&gt;how to fix this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2025 05:40:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-flag-error/m-p/13608722#M7107</guid>
      <dc:creator>saptadwip9</dc:creator>
      <dc:date>2025-05-01T05:40:04Z</dc:date>
    </item>
  </channel>
</rss>

