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, Robert White <robert....@gmail.com <javascript:>> 
> 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 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..
>>
>> 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:
>> # Keeps getting error output of "Invalid use of Maya object "lod_menu"
>> popupMenu -button 1 -postMenuCommand "import lod_select; lod_menu = 
>> lod_select.make_dropdown(); lod_select.show_menu(lod_menu)";
>>
>>
>> Any ideas?
>>
> -- 
> 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 python_inside_maya+unsubscr...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/python_inside_maya/6114e628-0030-4a87-813a-c9b0dc03125d%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/python_inside_maya/6114e628-0030-4a87-813a-c9b0dc03125d%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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/342319d0-07ff-47f8-9acd-6f9bf1c45a02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to