I don't have a maya available to test it currently, but did you try to run your command via the "python <https://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/Commands/python.html>" keyword in MEL? Calling, in MEL:
*python "import mat;mat.do_something()" * should be understood correctly by your MEL call, I assume Le ven. 26 août 2022, à 18 h 58, DGFA DAG's GRAPHIC & FOTO ART < [email protected]> a écrit : > Hi, > > I struggle with a custom menu. I will to have my own menu with all the > stuff I have in several shelfs. But when I codethe menu in Mel I don’t know > how to set the command attribute for executing a Mel command. > For example: > Mel > menuItem -p $mainWindow -l "Set Project" -c "SetProject" > menuItem -p $mainWindow -l "Create Material" -c "source mat.py" > > The first line works fine the second throws an error "file mat.py not > found" > > How can I solve this? > > Thanks, > Dag > > -- > 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/fe306d38-7042-4206-8656-b105c298d1a8n%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/fe306d38-7042-4206-8656-b105c298d1a8n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAHChmQbwXMnTv1KEhSgfW8X%2BxRNd3tfFYnHD6fDXKRSzRdFAsg%40mail.gmail.com.
