Well, I use Marking Menus a lot if not always, so the 'Windows>Setting/Preferences>Marking Menu Editor' is an old friend :)
This MM is one of the first MMs in the Editor. A simple MEL call: whatIs switchPanelToType; will spit out the location of that procedure (on windows for example 'C:/Program Files/Autodesk/Maya2016/scripts/startup/HotboxSouthMenu.mel') If you want to get more involved with MM customization this script from CC is the easiest way (I think) to do it without having to code it yourself. http://www.creativecrash.com/maya/script/mmtokey Glad to hear it works out for you. Cheers. 2016-02-06 11:27 GMT+01:00 Marcus Ottosson <[email protected]>: > That's brilliant, thanks Carlos. > > How do you find such things? I haven't customised marking menus before, > where would suggest I start looking for the default scripts, such as this > one? > > On 5 February 2016 at 11:26, Carlos Rico <[email protected]> wrote: > >> Without looking anything first thing to mind is to have a look at the >> default Marking Menu "ChangePanelType". The thing is it is MEL. >> >> # python code >> import maya.mel as mel >> mel.eval("switchPanelToType GraphEditor") >> >> You can have a look at "switchPanelToType" maybe to see how it is done in >> MEL and translate to python. Cheers. >> >> >> >> >> *Carlos Rico Adega*------------------------------------- >> <http://www.vimeo.com/16765581> LinkedIn >> <http://www.linkedin.com/pub/carlos-rico/6/58/325> >> [email protected] >> >> 2016-02-05 12:08 GMT+01:00 Marcus Ottosson <[email protected]>: >> >>> Hi all, >>> >>> Within each panel, I can go: >>> >>> - Panels -> Panel -> Graph Editor >>> >>> ..or.. >>> >>> - Panels -> Panel -> Script Editor >>> >>> ..etc. >>> >>> But I can't find a way to do this programmatically, to the currently >>> active panel. I'm looking for something like this. >>> >>> ```python >>> # psuedo code >>> panel = cmds.getPanel() >>> cmds.setPanel(panel, "GraphEditor") >>> ``` >>> >>> Any ideas? >>> >>> -- >>> *Marcus Ottosson* >>> [email protected] >>> >>> -- >>> 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/CAFRtmOC2_zaqpj4WwLeXO7z0RLAUEk%3DZAaV5ECmBmxGo5JBA-g%40mail.gmail.com >>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC2_zaqpj4WwLeXO7z0RLAUEk%3DZAaV5ECmBmxGo5JBA-g%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/CAFzJ14VkTTr-49v26magu93b6MMsptyGbfhDWiUsXVxTJwcxFw%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAFzJ14VkTTr-49v26magu93b6MMsptyGbfhDWiUsXVxTJwcxFw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > *Marcus Ottosson* > [email protected] > > -- > 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/CAFRtmOAEocV7yaJoo_ES_0kPuGa9PSCGh9qPor3uUwB6xbzCKw%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAEocV7yaJoo_ES_0kPuGa9PSCGh9qPor3uUwB6xbzCKw%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/CABZMTmQ7dN4_LmS1asX%3D_xAan5hBeODqpZNvTthyr4iVh1iO4w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
