one way or another, you'd have to override the dagMenuProc from maya, which is in MEL. But if you want to do it in python, nothing prevents you from calling some python code inside the MEL proc, and passing the objectName, I suppose.
Run (in MEL): whatIs dagMenuProc to find the proc on your machine Then go to the dagMenuProc function, and from here, you can do whatever you want, since the name under your cursor is given (by $object) hope this helps Le vendredi 19 juin 2020 00:08:18 UTC-4, Soham Parmar a écrit : > > Hi Guys, > I wanted to make custom markingMenu button like "IK / FK Snap" whenever i > RMB on "IK_ctrl". I don't want that markingMenu button on other controllers. > can anybody please help, I want to do in python. > > Thanks. > -- 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/dea2503e-5a1c-46bb-9813-5b48aabe65cao%40googlegroups.com.