Did you have a look at the documentation? http://download.autodesk.com/us/maya/2011help/CommandsPython/optionMenuGrp.html#flagchangeCommand
You can attach a callback to the changeCommand and then use a query flag to get the value of the optionMenuGrp selected item. The callback may pass you the selected value but I don't remember On 16/10/2014 10:32 PM, "likage" <[email protected]> wrote: > I am slowly trying to integrate parts by parts as I played and test around > with it. > However, I have a questions. > > Seeing that I have 2 menu options, while it is possible for me to create > functions individually for each of the menu option, I am trying to add on a > button in which it will fire the final confirmation when User clicks onto > it. And hence, I would like to ask how do I 'capture' the info of the menu > selection? > > > On Thursday, October 16, 2014 4:05:46 AM UTC+8, Justin Israel wrote: >> >> Oh ok. This make a little more sense now. I can see that your >> fileExporter is a completely custom class and has nothing to do with the >> actual plugin class. What you probably want to do is to move your logic >> that is in your __init__ into another method. Your writer plugin can then >> create an instance of the FileExplorer, and have it show the UI. Then it >> can take the values from the UI and call another method that actually does >> the work. Your constructor shouldn't be doing all the work. >> >> -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/27ba17c4-a696-43e2-b5c1-fa50f244d2cf%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/27ba17c4-a696-43e2-b5c1-fa50f244d2cf%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0i2hR2qGg-bwDmL%2BQ9XBWk%2B3%2B%2Btvxvm%3DJdBQUXffPp6A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
