Re: [Maya-Python] dynamically changing sys.path

2018-07-26 Thread Alok Gandhi
Try using importlib or imp Although, as Justin has already pointed out, it is not recommended to use reload in production code or to dynamically append/insert paths in sys.path. Give more thought to

Re: [Maya-Python] dynamically changing sys.path

2018-07-26 Thread Justin Israel
Would you be able to explain a bit more about the goal you are trying to solve, with dynamically loading a second widget into your main application? Does this second widget have drastically different dependencies? I'm interested specifically in the part where you need to reload modules. This is

Re: [Maya-Python] Re: popupMenu command works in Python but not in Mel

2018-07-26 Thread likage
Adding in a bit more information. My objective initially is to have a shelfButton to have 2 different selection menus. 1. If User clicks on the shelf button, it will shows menuA... 2. If User clicks on the shelf button while pressing "ALT" key, it will shows menuB... My initial code, where it

Re: [Maya-Python] Re: popupMenu command works in Python but not in Mel

2018-07-26 Thread likage
Doesn't seems to work... Getting the same error... On Thursday, July 26, 2018 at 1:53:11 PM UTC-7, simon payne wrote: > > Yup, as Robert says. You can cast a python command though : > > -postMenuCommand = “python ‘myCommand()’” > > Simon > > Sent from my iPhone > > On 26 Jul 2018, at 21:22,

Re: [Maya-Python] Re: popupMenu command works in Python but not in Mel

2018-07-26 Thread Simon Payne
Yup, as Robert says. You can cast a python command though : -postMenuCommand = “python ‘myCommand()’” Simon Sent from my iPhone > On 26 Jul 2018, at 21:22, Robert White wrote: > > I believe the problem you're running into here, is that the popupMenu > -postMenuCommand expects the command to

[Maya-Python] Re: popupMenu command works in Python but not in Mel

2018-07-26 Thread likage
I see... Any possible way that I can make it to evaluate in Python? On Thursday, July 26, 2018 at 1:22:18 PM UTC-7, Robert White wrote: > > I believe the problem you're running into here, is that the popupMenu > -postMenuCommand expects the command to be in mel, because you're > triggering it

[Maya-Python] Re: popupMenu command works in Python but not in Mel

2018-07-26 Thread Robert White
I believe the problem you're running into here, is that the popupMenu -postMenuCommand expects the command to be in mel, because you're triggering it from mel. On Thursday, July 26, 2018 at 3:01:24 PM UTC-5, likage wrote: > > I was trying to convert a popupMenu command from Python to Mel.. > >

[Maya-Python] popupMenu command works in Python but not in Mel

2018-07-26 Thread likage
I was trying to convert a popupMenu command from Python to Mel.. When using Python: cmds.popupMenu( button=1, postMenuCommand="import lod_select; lod_menu = lod_select.make_dropdown(); lod_select.show_menu(lod_menu)") However, when I tried converting the above command into MEL, I get an error:

[Maya-Python] Need - Performance Lead/Architect - Bloomfield, CT

2018-07-26 Thread Priyank Jain
Hello, Hope you are fine! Need Performance Lead/Architect Location- Bloomfield, CT Skill- Load runner, win runner , Heap dump, thread dump, Performance tunning Thank you very much. ___ *Priyank Jain* *Desk:* 609-853-0818 Ext.2187 *Fax:*609-799-5746 *Email:*

[Maya-Python] dynamically changing sys.path

2018-07-26 Thread Juan Cristóbal Quesada
Hi, this is more of a pure python question i want to throw here. Im developing a PySide Application that is used as the context/task/app/openfile launcher by the artists. The artist makes some choices that drive him towards different dialogs and widgets. The thing is, due to a request, im facing