I have done a lot of development within Maya and Softimage but nothing with 3dsmax. Experience has shown me good and bad ways to expose tools within Maya/Softimage so I figured I’d query your approaches for Max before I dive in and make a bunch of rookie errors.
With Maya i’d typically use Maya Modules and add the MAYA_MODULE_PATH environment variable to define where to look for all the Maya tools along with the pythonpath environment var etc. What is the equivalent for max, or how do you structure your max plugins/scripts and ensure they’re all loaded? (I read about the plugin.ini files, is that the best approach?)
I see that you can customise the UI, adding toolbars and menu’s etc. From what I can see it embeds those changes into a files which typically contains the whole UI’s state rather than a file for a single toolbar/menu. What approach do you usually take to expose your tools within Maya whilst also giving people the ability to customise their general UI?
All info is welcome, and any ‘gotchas’ that I should be aware of or avoid would be greatly appreciated.
How I remember doing it was having a startup script that loaded in all the custom tools and plugins.
This also generate the whole UI layout of the menuItems for the studio tools.
UI customization was in the hands of the artist as they all had their different flow in 3ds max. One you loaded the scripted plugins and maxsdk plugins, the artist could map their own shortcuts or toolbar buttons.
I have seen other projects load in a UI structure in the QuadMenu`s, but I prefer letting the artists set it up for themselves as you dont want to ruin their current workflow.
Is there an equivalent of an ‘executeDeferred’ function in 3dsmax? In Maya for instance I use that within a startup script to make gui alterations as it means the code is executed only when Maya has fully loaded, I’d like to do the same in Max ( to rebuild a custom menu each time max is loaded ).
You shouldn’t have to wait until 3ds Max is done loading everything to do that. We rebuild a menu at startup using a .ms script in the regular scripts\startup folder.
An important tip if you’re new to 3dsMax, is that if you create macroscripts in order to launch your tools, make sure they simply load in a separate file with the tool code (filein function works for this) on execute. Macros are initialized during 3dsMax start, which means if your tool code lies in the macroscript file in question, and you wish to deploy a quick change, the artist will be required to either re-evaluate the macro or reload 3dsMax. Keeping the tool code in seperate files means that if an artist “gets latest” from version control on the separate tool file, they simply need relaunch the macro to see the latest reversion of the tool.