New Tool: ml_toolbox

Courtesy of my Patreon supporters, I’ve uploaded the first tool of 2016, ml_toolbox!

ml_toolbox is a utility for organizing scripts in maya. It came about from having a very crowded scripts directory, with no good way to organize or group scripts on disk and also have them easily accessible in maya. I like shelves, but they take some setting up, and can get crowded. The idea with this is that you organize your scripts into folders, and then those folders are used to generate menus in maya.

To try it out, if you download, you’ll get the script and the required root folder (ml_toolbox_menu). It comes with a few example scripts which are organized in maya’s default folders already. Extract the script and folder to your scripts directory, and run import ml_toolbox;ml_toolbox.main(), and you’ll see the scripts in the folders show up in maya’s menus (File, Create, etc.). They’re prefixed with a * for quick identification.

From there, just create new folders and add your own scripts to them. If you want to get rid of a menu, just move it or delete it. If a folder matches an existing Maya menu name, the tools will be added to that menu, if it doesn’t, a new menu will be created. The only requirement for the scripts is for mel files the name of the procedure needs to be the same as the name of the file (which is generally the case), and for python scripts the primary function should be called main() or ui(). See the header of the script for more info on advanced use, or I can go into more detail if people would like. All the scripts on this site should work fine with it.

Version: 5
31.7 KiB

And last, I have to mention that I’m writing this an hour before midnight on the last day of January, and so I know I definitely would have shirked this deadline without the Patreon supporters, so I can say that the experiment is working so far. Thank you guys! Time to start thinking about next months tool…

Share Button
This entry was posted in Crowdfunding, Tools. Bookmark the permalink.

12 Responses to New Tool: ml_toolbox

  1. I’ve only been able to test this on Mac and Linux, so I’d appreciate a comment from any Windows user who has tried this out and can say whether or not it works correctly on that platform! Thanks!

  2. roo says:

    Hey Morgan, thanks for getting this out in time! 🙂

    Just had a go trying to install on Maya 2016 windows but it doesn’t seem to do anything?

    Followed your instructions as best I could but maybe Ive done something weird 😉


  3. Duncan Rudd says:

    Hey Morgan, thanks for the tool – it sounds like a great place to start!

    Just tried it on Maya 2016 Windows 7 x64. Not sure if I’m doing something wrong but running: ‘import ml_toolbox; ml_toolbox.main()’ gives me this in the script editor: ‘pre-building menu: Constrain
    pre-building menu: Create
    pre-building menu: Edit
    pre-building menu: File
    pre-building menu: Modify
    pre-building menu: Skeleton
    pre-building menu: Skin’

    I don’t see any change in the menus though – no new items with the asterisk prefix…


  4. Alright, thanks for the feedback guys. That script editor feedback looks correct but curious there’s no errors. If you have time could you try a custom menu, just rename one of the bundled folders. I’ll see if I can’t get Maya up and running on Windows.

  5. Duncan Rudd says:

    Re-naming the ‘file’ folder to ‘newMenu’ gives the following error:

    _| New Menu |____________
    New Menu <– has errors and was unable to be imported.
    New Menu <– has errors and was unable to be imported.

    Hope that helps you track it down – let me know if there's anything else I can do to help.

  6. Pretty sure I know the issue, I’ll update tonight. Technically it’s still January in some part of the world. Thanks for your patience. (And thanks to Ryan Porter for the help with pinpointing.)

  7. I’ve just uploaded version 2 which should hopefully be working on Windows now, so if you’ve downloaded version 1, give it another go. Thanks for your patience! (I figure technically it’s still January in some places.)
    If you’re still having trouble, let me know.

  8. Duncan Rudd says:

    v2 works great for me now – thanks Morgan!

  9. Aron Durkin says:

    Did everyone manage to get this working on windows with custom user folders? It works on my custom folder with MEL scripts but not python scripts, even the “ml” ones says errors occurred and were unable to be imported.

  10. I’ve got it going on windows. Can you double check you’ve got the latest scripts (as of a couple months ago), and that the scripts in your custom folder can be run on their own, and have a main() function. If it’s showing any other errors, pass that along as well.

  11. The solution to Aron’s issue was that his folder was missing its file. The tool should be trying to create those automatically, but if anyone else is running into this give that a try.

  12. I think I found the bug that was preventing the __init__ files from being created automatically on windows, I’ve updated the script.

Leave a Reply

Your email address will not be published. Required fields are marked *