Thanks guys! Turns out I'm a dork, who knew.. I had accidentally indented my initializePlugin() and uninitializePlugin() functions, so Maya was initializing a warm cup of jack squat, and of course gave no errors. Placing my call to build the menu inside initializePlugin() works just fine now.
-Tim On Mon, Apr 21, 2014 at 3:10 PM, Tony Barbieri <[email protected]> wrote: > If the menu creation is failing in initializePlugin I recommend trying > what I did in my example above by using MGlobal::executeCommandOnIdle if > in C++ or executeDeferred/evalDeferred ( if in python as per our > conversation the other day :) ). > > > On Mon, Apr 21, 2014 at 4:04 PM, Justin Israel <[email protected]>wrote: > >> >> On Apr 22, 2014 3:49 AM, "Tim Crowson" <[email protected]> wrote: >> > >> > I've got another set of questions here as I try to wrap my head around >> how Maya does things. I'm sure these are fairly mundane things in the end... >> > >> > 1. I know how to create my own custom menu at launch via userSetup.py, >> but I'm having trouble understanding how I would do this instead via a >> distributed plugin. The docs I've been looking at for custom commands, for >> example, are clear about what's necessary for Maya to recognize a >> registered command, but I don't see how to 'register' a custom menu. I >> tried to cheat my way around it by placing my buildMenu() code inside my >> custom command's initializePlugin() function, but that failed. I've seen >> one or two partial examples of a registerUI() method I can call, but I >> can't find any solid documentation on this. Anyway... just looking for some >> tips there on moving my custom menu out of the userSetup and into a shared >> plugin on the network. >> >> Did it fail with an error or just not do anything? I would think it >> should work, being managed from the initialize function. There is also the >> thing where you can specify a companion Mel script that will be called with >> your plugin. >> Plugin aside, it can also be something in userSetup that just imports a >> shared module on the network. >> >> > >> > 2. Is it possible to have a custom plugin auto-load without requiring >> the user to explicitly check the option to auto-load it in the Plugin >> Manager? >> >> That can be part of a shared python module being imported at startup or a >> Mel script in the scripts path that will get sourced automatically. >> >> > >> > 3. Maya 2015 seems to take much longer than 2014 to shutdown. Is it >> just me or is something really different here? >> > >> > Thanks again for any help! >> > >> > -Tim Crowson >> > Magnetic Dreams >> > >> > -- >> > 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/CAPh%3D1bm6PAx37afDQOEx_s%2BLpdLMCApauAxnW1960REdmcBvJA%40mail.gmail.com >> . >> > 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/CAPGFgA3brEm6QJJADJ1tqcBsvK20eJvSS4wQ-VnCO0dmyGXD0A%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3brEm6QJJADJ1tqcBsvK20eJvSS4wQ-VnCO0dmyGXD0A%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > -tony > > -- > 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/CAJhmvsT9NEK-R8gBi3fxa7qcA9HPAE31-XVcL1XPjd5XmyjhdQ%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAJhmvsT9NEK-R8gBi3fxa7qcA9HPAE31-XVcL1XPjd5XmyjhdQ%40mail.gmail.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/CAPh%3D1bkzoceTBFBCYWNMOGFD2W-KX1cERMyMLa5L-XbLNMp5kw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
