julca Posted October 12, 2016 Share Posted October 12, 2016 Hello, I'm happy to share with you the script plugin XPopMenu ! Initially developed on Softimage by Reinhard Claus, XPopMenu is a popup menu that you can associate to a hotkey to get under the hand a quick and easy customizable set of tools. you can layout your menu using simple method like "addItem", "addTitleItem", "addSeparator" and "addSubMenu" If you want you can add icon for each action item (icons collection come from axialis.com with some custom from Reinhard Claus) As concrete example, I've joined two bonus tools : one to get distance and an other to get angle. Quick demo : I Hope you like it ! Cheers XPopMenu.zip 7 Quote Link to comment Share on other sites More sharing options...
julca Posted April 8, 2017 Author Share Posted April 8, 2017 Hello, Just to post an updated version which work with H16 (which use PySide2 module instead of PySide). Cheers XPopMenu_for_H16.zip 1 Quote Link to comment Share on other sites More sharing options...
Houdini7 Posted January 2, 2020 Share Posted January 2, 2020 Cool, thanks. Is there a possibility to extand it, so that it recognizes the context. For example sop context, points selected. In this case context sensitive menus would be possible. Quote Link to comment Share on other sites More sharing options...
julca Posted January 3, 2020 Author Share Posted January 3, 2020 Hello @Houdini7, Yes theoretically it's totally possible. You just need to add a conditionnal "if" bracket on specific menu that follow your mode. So the only "hard" part is just to determine in python in which mode we are (point, primitive, etc.) . if (onPointMode) { paramDict = {"uiPath" : demoFolderPath + "getAngle.ui"} mySubMenuTool.addItem("Get Angle", demoFolderPath + "getAngle.py", "getAngle", paramDict) } Quote Link to comment Share on other sites More sharing options...
Houdini7 Posted January 3, 2020 Share Posted January 3, 2020 Nice, will try it out in my spare time. Any idea how I can read the context in python? Quote Link to comment Share on other sites More sharing options...
julca Posted January 3, 2020 Author Share Posted January 3, 2020 You can start with GeometrySelection doc with the "geometryType()" method for example ? Let me know ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.